• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ teuchos::ArrayRCP类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中teuchos::ArrayRCP的典型用法代码示例。如果您正苦于以下问题:C++ ArrayRCP类的具体用法?C++ ArrayRCP怎么用?C++ ArrayRCP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ArrayRCP类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: writeToScreen

    void writeToScreen(std::ostream & os,const Thyra::VectorBase<double> & src)
    {
      const Thyra::SpmdVectorBase<double> & spmdSrc =
             Teuchos::dyn_cast<const Thyra::SpmdVectorBase<double> >(src);

      // get access to data
      Teuchos::ArrayRCP<const double> srcData;
      spmdSrc.getLocalData(Teuchos::ptrFromRef(srcData));
      os << "Local Size = " << srcData.size() << std::endl;
      for (int i=0; i < srcData.size(); ++i) {
         os << "   " << srcData[i] << std::endl;
      }
    }
开发者ID:uppatispr,项目名称:trilinos-official,代码行数:13,代码来源:user_app_NOXObserver_WriteToExodus.hpp


示例2:

 void LocalAggregationAlgorithm<LocalOrdinal, GlobalOrdinal, Node, LocalMatOps>::RandomReorder(Teuchos::ArrayRCP<LO> list) const {
   //TODO: replace int
   int n = list.size();
   for(int i=0; i<n-1; i++) {
     std::swap(list[i], list[RandomOrdinal(i,n-1)]);
   }
 }
开发者ID:jgoldfar,项目名称:trilinos,代码行数:7,代码来源:MueLu_LocalAggregationAlgorithm_def.hpp


示例3: buildEvaluators

//------------------------------------------------------------------------------
void
Albany::MechanicsProblem::
buildProblem(
    Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct>> meshSpecs,
    Albany::StateManager& stateMgr)
{
  // Construct All Phalanx Evaluators
  int physSets = meshSpecs.size();
  *out << "Num MeshSpecs: " << physSets << '\n';
  fm.resize(physSets);
  bool haveSidesets = false;

  *out << "Calling MechanicsProblem::buildEvaluators" << '\n';
  for (int ps = 0; ps < physSets; ++ps) {
    fm[ps] = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
    buildEvaluators(*fm[ps], *meshSpecs[ps], stateMgr, BUILD_RESID_FM,
        Teuchos::null);
    if (meshSpecs[ps]->ssNames.size() > 0) haveSidesets = true;
  }
  constructDirichletEvaluators(*meshSpecs[0]);

  if (haveSidesets)

  constructNeumannEvaluators(meshSpecs[0]);

}
开发者ID:TheDylanViper,项目名称:Albany,代码行数:27,代码来源:MechanicsProblem.cpp


示例4: buildProblem

void Hydrology::buildProblem (Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >  meshSpecs,
                                     Albany::StateManager& stateMgr)
{
  // Building cell basis and cubature
  const CellTopologyData * const cell_top = &meshSpecs[0]->ctd;
  intrepidBasis = Albany::getIntrepid2Basis(*cell_top);
  cellType = Teuchos::rcp(new shards::CellTopology (cell_top));

  Intrepid2::DefaultCubatureFactory cubFactory;
  cubature = cubFactory.create<PHX::Device, RealType, RealType>(*cellType, meshSpecs[0]->cubatureDegree);

  elementBlockName = meshSpecs[0]->ebName;

  const int worksetSize     = meshSpecs[0]->worksetSize;
  const int numCellVertices = cellType->getNodeCount();
  const int numCellNodes    = intrepidBasis->getCardinality();
  const int numCellQPs      = cubature->getNumPoints();

  dl = Teuchos::rcp(new Albany::Layouts(worksetSize,numCellVertices,numCellNodes,numCellQPs,numDim));

  /* Construct All Phalanx Evaluators */
  TEUCHOS_TEST_FOR_EXCEPTION(meshSpecs.size()!=1,std::logic_error,"Problem supports one Material Block");
  fm.resize(1);
  fm[0]  = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
  buildEvaluators(*fm[0], *meshSpecs[0], stateMgr, Albany::BUILD_RESID_FM,Teuchos::null);

  if(meshSpecs[0]->nsNames.size() > 0) {
    // Build a nodeset evaluator if nodesets are present
    constructDirichletEvaluators(*meshSpecs[0]);
  }
  if(meshSpecs[0]->ssNames.size() > 0) {
    // Build a sideset evaluator if sidesets are present
     constructNeumannEvaluators(meshSpecs[0]);
  }
}
开发者ID:gahansen,项目名称:Albany,代码行数:35,代码来源:LandIce_Hydrology.cpp


示例5: function_coeffs

void IntrepidKernel<Scalar>::evaluate( 
    Teuchos::ArrayRCP<Scalar> &function_values,
    const Teuchos::ArrayRCP<Scalar> &coeffs,
    const Teuchos::ArrayRCP<Scalar> &dfunc_values )
{
    int dim1 = this->b_cardinality;
    testPrecondition( dim1 == (int) coeffs.size(),
	"Function coefficients size does not match basis cardinality" );
    
    MDArray function_coeffs( 1, dim1 );
    for ( int m = 0; m < dim1; ++m )
    {
	function_coeffs(0,m) = coeffs[m];
    }
    MDArray basis_eval( 1, dim1, 1 );
    for ( int i = 0; i < dim1; ++i )
    {
	basis_eval( 0, i, 0 ) = dfunc_values[i];
    }

    Teuchos::Tuple<int,2> function_dimensions;
    function_dimensions[0] = 1;
    function_dimensions[1] = 1;
    MDArray function_eval( function_dimensions, function_values );
    Intrepid::FunctionSpaceTools::evaluate<Scalar>( function_eval,
						    function_coeffs, 
						    basis_eval );
}
开发者ID:sslattery,项目名称:FOOD,代码行数:28,代码来源:IntrepidKernel_Def.hpp


示例6: buildEvaluators

void
Albany::PNPProblem::
buildProblem(
  Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >  meshSpecs,
  Albany::StateManager& stateMgr)
{
  using Teuchos::rcp;
  /* Construct All Phalanx Evaluators */
  int physSets = meshSpecs.size();
  std::cout << "PNP Problem Num MeshSpecs: " << physSets << std::endl;
  fm.resize(physSets);

  for (int ps=0; ps<physSets; ps++) {
    fm[ps]  = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
    buildEvaluators(*fm[ps], *meshSpecs[ps], stateMgr, BUILD_RESID_FM,
                    Teuchos::null);
  }

  if(meshSpecs[0]->nsNames.size() > 0) // Build a nodeset evaluator if nodesets are present

    constructDirichletEvaluators(*meshSpecs[0]);

  if(meshSpecs[0]->ssNames.size() > 0) // Build a sideset evaluator if sidesets are present

    constructNeumannEvaluators(meshSpecs[0]);
}
开发者ID:gahansen,项目名称:Albany,代码行数:26,代码来源:Albany_PNPProblem.cpp


示例7: rcp

void
Albany::NavierStokes::
buildProblem(
  Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >  meshSpecs,
  Albany::StateManager& stateMgr)
{
  using Teuchos::rcp;

 /* Construct All Phalanx Evaluators */
  TEUCHOS_TEST_FOR_EXCEPTION(meshSpecs.size()!=1,std::logic_error,"Problem supports one Material Block");

  fm.resize(1);
  fm[0]  = rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
  buildEvaluators(*fm[0], *meshSpecs[0], stateMgr, BUILD_RESID_FM, 
		  Teuchos::null);

  if(meshSpecs[0]->nsNames.size() > 0) // Build a nodeset evaluator if nodesets are present

     constructDirichletEvaluators(meshSpecs[0]->nsNames);

  if(meshSpecs[0]->ssNames.size() > 0) // Build a sideset evaluator if sidesets are present

     constructNeumannEvaluators(meshSpecs[0]);

}
开发者ID:ImmutableLtd,项目名称:Albany,代码行数:25,代码来源:Albany_NavierStokes.cpp


示例8: buildEvaluators

void
Albany::HMCProblem::
buildProblem(
  Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct>>  meshSpecs,
  Albany::StateManager& stateMgr)
{
  /* Construct All Phalanx Evaluators */
  TEUCHOS_TEST_FOR_EXCEPTION(meshSpecs.size()!=1,std::logic_error,"Problem supports one Material Block");

  fm.resize(1);

  fm[0]  = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
  buildEvaluators(*fm[0], *meshSpecs[0], stateMgr, BUILD_RESID_FM, 
		  Teuchos::null);

  if(meshSpecs[0]->nsNames.size() > 0) // Build a nodeset evaluator if nodesets are present

    constructDirichletEvaluators(*meshSpecs[0]);

  if(meshSpecs[0]->ssNames.size() > 0) // Build a sideset evaluator if sidesets are present

    constructNeumannEvaluators(meshSpecs[0]);

#ifdef ALBANY_ATO
  if( params->isType<Teuchos::RCP<ATO::Topology>>("Topology") )
   setupTopOpt(meshSpecs,stateMgr);
#endif
}
开发者ID:TheDylanViper,项目名称:Albany,代码行数:28,代码来源:HMCProblem.cpp


示例9: p

DataTransferKit::FieldContainer<double>
MultiAppDTKUserObjectEvaluator::evaluate(const Teuchos::ArrayRCP<GlobalOrdinal>& bids, const Teuchos::ArrayRCP<double>& coords)
{
  Teuchos::RCP<const Teuchos::Comm<int> > comm = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::rcp(new Teuchos::OpaqueWrapper<MPI_Comm>(libMesh::COMM_WORLD))));

  int num_values = bids.size();

  Teuchos::ArrayRCP<double> evaluated_data(num_values);

  unsigned int dim = 3;  // TODO: REPLACE ME!!!!!!!!!

  for (GlobalOrdinal i=0; i<num_values; i++)
  {
    // See if this app is on this processor
    if (std::binary_search(_box_ids.begin(), _box_ids.end(), bids[i]))
    {
      GlobalOrdinal app = bids[i];

      Point p;
      for(unsigned int j=0; j<dim; j++)
        p(j) = coords[(j*num_values)+i];

      evaluated_data[i] = _multi_app.appUserObjectBase(app, _user_object_name).spatialValue(p);
    }
    else
      evaluated_data[i] = 0.0;
  }

  return DataTransferKit::FieldContainer<double>(evaluated_data, 1);
}
开发者ID:Jieun2,项目名称:moose,代码行数:30,代码来源:MultiAppDTKUserObjectEvaluator.C


示例10: buildEvaluators

void
Albany::PoissonsEquationProblem::
buildProblem(
  Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >  meshSpecs,
  Albany::StateManager& stateMgr)
{

  int physSets = meshSpecs.size();
  *out << "Num MeshSpecs: " << physSets << '\n';
  fm.resize(physSets);
  bool haveSidesets = false;

  *out << "Calling PoissonsEquationProblem::buildEvaluators" << '\n';
  for (int ps = 0; ps < physSets; ++ps) {
    fm[ps] = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
    buildEvaluators(*fm[ps], *meshSpecs[ps], stateMgr, BUILD_RESID_FM,
        Teuchos::null);
    if (meshSpecs[ps]->ssNames.size() > 0) haveSidesets = true;
  }
  constructDirichletEvaluators(*meshSpecs[0]);

  if( haveSidesets )
    constructNeumannEvaluators(meshSpecs[0]);

  if( params->isType<Teuchos::RCP<ATO::Topology> >("Topology") )
    setupTopOpt(meshSpecs,stateMgr);

}
开发者ID:ImmutableLtd,项目名称:Albany,代码行数:28,代码来源:PoissonsEquation.cpp


示例11: evaluate

    MyField evaluate( 
	const Teuchos::ArrayRCP<MyMesh::global_ordinal_type>& elements,
	const Teuchos::ArrayRCP<double>& coords )
    {
	int num_elements = elements.size();
	MyField evaluated_data( num_elements, 3 );
	for ( int n = 0; n < num_elements; ++n )
	{
	    if ( std::find( d_mesh.elementsBegin(),
			    d_mesh.elementsEnd(),
			    elements[n] ) != d_mesh.elementsEnd() )
	    {
		*(evaluated_data.begin() + n ) = d_comm->getRank() + 1.0;
		*(evaluated_data.begin() + num_elements + n ) = 
		    d_comm->getRank() + 1.0;
		*(evaluated_data.begin() + 2*num_elements + n ) = 
		    d_comm->getRank() + 1.0;
	    }
	    else
	    {
 		*(evaluated_data.begin() + n ) = 0.0;
		*(evaluated_data.begin() + num_elements + n ) = 0.0;
		*(evaluated_data.begin() + 2*num_elements + n ) = 0.0;
	    }
	}
	return evaluated_data;
    }
开发者ID:wrschwarz88,项目名称:DataTransferKit,代码行数:27,代码来源:tstSharedDomainMap2.cpp


示例12: set_local

//-----------------------------------------------------------------------------
void TpetraVector::set_local(const std::vector<double>& values)
{
  dolfin_assert(!_x.is_null());
  const std::size_t num_values = local_size();
  if (values.size() != num_values)
  {
    dolfin_error("TpetraVector.cpp",
                 "set local values of Tpetra vector",
                 "Size of values array is not equal to local vector size");
  }

  if (num_values == 0)
    return;

  Teuchos::ArrayRCP<double> arr = _x->getDataNonConst(0);
  std::copy(values.begin(), values.end(), arr.get());
}
开发者ID:vincentqb,项目名称:dolfin,代码行数:18,代码来源:TpetraVector.cpp


示例13: ownedActive

void 
Filtered_UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT>::
getOwnedAndGhostedNotFilteredIndicator(std::vector<int> & indicator) const
{
  using Teuchos::RCP;

  typedef GlobalOrdinalT GO;
  typedef LocalOrdinalT LO;
  typedef panzer::TpetraNodeType Node;
  typedef Tpetra::Map<LO, GO, Node> Map;
  typedef Tpetra::Vector<GO,LO,GO,Node> Vector;
  typedef Tpetra::Import<LO,GO,Node> Import;

  std::vector<GlobalOrdinalT> ownedIndices;
  std::vector<GlobalOrdinalT> ghostedIndices;

  // build owned and ghosted maps
  getOwnedIndices(ownedIndices);
  getOwnedAndGhostedIndices(ghostedIndices);

  RCP<const Map> ownedMap 
      = Tpetra::createNonContigMap<LO,GO>(ownedIndices,getComm());
  RCP<const Map> ghostedMap 
      = Tpetra::createNonContigMap<LO,GO>(ghostedIndices,getComm());

  // allocate the owned vector, mark those GIDs as unfiltered
  // (they are by definition)
  Vector ownedActive(ownedMap);
  ownedActive.putScalar(1);

  // Initialize all indices to zero
  Vector ghostedActive(ghostedMap);
  ghostedActive.putScalar(0);

  // do communication, marking unfiltered indices as 1 (filtered
  // indices locally are marked as zero)
  Import importer(ownedMap,ghostedMap);
  ghostedActive.doImport(ownedActive,importer,Tpetra::INSERT);

  Teuchos::ArrayRCP<const GO> data = ghostedActive.getData();

  // copy communicated data (clear it out first)
  indicator.clear();
  indicator.insert(indicator.end(),data.begin(),data.end()); 
}
开发者ID:mhoemmen,项目名称:Trilinos,代码行数:45,代码来源:Panzer_Filtered_UniqueGlobalIndexer_impl.hpp


示例14: evaluate

    DataTransferKit::FieldContainer<double> evaluate( 
	const Teuchos::ArrayRCP<int>& gids,
	const Teuchos::ArrayRCP<double>& coords )
    {
	Teuchos::ArrayRCP<double> evaluated_data( gids.size() );
	for ( int n = 0; n < gids.size(); ++n )
	{
	    if ( std::find( d_geom_gids.begin(),
			    d_geom_gids.end(),
			    gids[n] ) != d_geom_gids.end() )
	    {
		evaluated_data[n] = 1.0 + gids[n];
	    }
	    else
	    {
		evaluated_data[n] = 0.0;
	    }
	}
	return DataTransferKit::FieldContainer<double>( evaluated_data, 1 );
    }
开发者ID:andrsd,项目名称:DataTransferKit,代码行数:20,代码来源:tstVolumeSourceMap3.cpp


示例15: evaluate

    MyField evaluate( 
	const Teuchos::ArrayRCP<int>& gids,
	const Teuchos::ArrayRCP<double>& coords )
    {
	MyField evaluated_data( gids.size(), 1 );
	for ( int n = 0; n < gids.size(); ++n )
	{
	    if ( std::find( d_geom_gids.begin(),
			    d_geom_gids.end(),
			    gids[n] ) != d_geom_gids.end() )
	    {
		*(evaluated_data.begin() + n ) = 1.0;
	    }
	    else
	    {
		*(evaluated_data.begin() + n ) = 0.0;
	    }
	}
	return evaluated_data;
    }
开发者ID:wrschwarz88,项目名称:DataTransferKit,代码行数:20,代码来源:tstVolumeSourceMap1.cpp


示例16: evaluate

    MyField evaluate( 
	const Teuchos::ArrayRCP<
	DataTransferKit::MeshContainer<int>::global_ordinal_type>& elements,
	const Teuchos::ArrayRCP<double>& coords )
    {
	MyField evaluated_data( elements.size(), 1 );
	for ( int n = 0; n < elements.size(); ++n )
	{
	    if ( std::find( d_mesh.elementsBegin(),
			    d_mesh.elementsEnd(),
			    elements[n] ) != d_mesh.elementsEnd() )
	    {
		*(evaluated_data.begin() + n ) = d_comm->getRank() + 1.0;
	    }
	    else
	    {
 		*(evaluated_data.begin() + n ) = 0.0;
	    }
	}
	return evaluated_data;
    }
开发者ID:wrschwarz88,项目名称:DataTransferKit,代码行数:21,代码来源:tstSharedDomainMap10.cpp


示例17: Setup

  void Ifpack2Smoother<Scalar, LocalOrdinal, GlobalOrdinal, Node>::SetupLineSmoothing(Level& currentLevel) {
    if (this->IsSetup() == true)
      this->GetOStream(Warnings0) << "MueLu::Ifpack2Smoother::Setup(): Setup() has already been called" << std::endl;

    ParameterList& myparamList = const_cast<ParameterList&>(this->GetParameterList());

    LO CoarseNumZLayers = Factory::Get<LO>(currentLevel,"CoarseNumZLayers");
    if (CoarseNumZLayers > 0) {
      Teuchos::ArrayRCP<LO> TVertLineIdSmoo = Factory::Get< Teuchos::ArrayRCP<LO> >(currentLevel, "LineDetection_VertLineIds");

      // determine number of local parts
      LO maxPart = 0;
      for(size_t k = 0; k < Teuchos::as<size_t>(TVertLineIdSmoo.size()); k++) {
        if(maxPart < TVertLineIdSmoo[k]) maxPart = TVertLineIdSmoo[k];
      }

      size_t numLocalRows = A_->getNodeNumRows();
      TEUCHOS_TEST_FOR_EXCEPTION(numLocalRows % TVertLineIdSmoo.size() != 0, Exceptions::RuntimeError,
        "MueLu::Ifpack2Smoother::Setup(): the number of local nodes is incompatible with the TVertLineIdsSmoo.");

      if (numLocalRows == Teuchos::as<size_t>(TVertLineIdSmoo.size())) {
        myparamList.set("partitioner: type","user");
        myparamList.set("partitioner: map",TVertLineIdSmoo);
        myparamList.set("partitioner: local parts",maxPart+1);
      } else {
        // we assume a constant number of DOFs per node
        size_t numDofsPerNode = numLocalRows / TVertLineIdSmoo.size();

        // Create a new Teuchos::ArrayRCP<LO> of size numLocalRows and fill it with the corresponding information
        Teuchos::ArrayRCP<LO> partitionerMap(numLocalRows, Teuchos::OrdinalTraits<LocalOrdinal>::invalid());
        for (size_t blockRow = 0; blockRow < Teuchos::as<size_t>(TVertLineIdSmoo.size()); ++blockRow)
          for (size_t dof = 0; dof < numDofsPerNode; dof++)
            partitionerMap[blockRow * numDofsPerNode + dof] = TVertLineIdSmoo[blockRow];
        myparamList.set("partitioner: type","user");
        myparamList.set("partitioner: map",partitionerMap);
        myparamList.set("partitioner: local parts",maxPart + 1);
      }

      if (type_ == "LINESMOOTHING_BANDED_RELAXATION" ||
          type_ == "LINESMOOTHING_BANDED RELAXATION" ||
          type_ == "LINESMOOTHING_BANDEDRELAXATION")
        type_ = "BANDEDRELAXATION";
      else
        type_ = "BLOCKRELAXATION";
    } else {
      // line detection failed -> fallback to point-wise relaxation
      this->GetOStream(Runtime0) << "Line detection failed: fall back to point-wise relaxation" << std::endl;
      myparamList.remove("partitioner: type",false);
      myparamList.remove("partitioner: map", false);
      myparamList.remove("partitioner: local parts",false);
      type_ = "RELAXATION";
    }

    RCP<const Tpetra::RowMatrix<SC, LO, GO, NO> > tpA = Utilities::Op2NonConstTpetraRow(A_);

    prec_ = Ifpack2::Factory::create(type_, tpA, overlap_);
    SetPrecParameters();
    prec_->initialize();
    prec_->compute();
  }
开发者ID:crtrott,项目名称:Trilinos,代码行数:60,代码来源:MueLu_Ifpack2Smoother_def.hpp


示例18: gather_on_zero

//-----------------------------------------------------------------------------
void TpetraVector::gather_on_zero(std::vector<double>& v) const
{
  dolfin_assert(!_x.is_null());
  if (_x->getMap()->getComm()->getRank() == 0)
    v.resize(size());
  else
    v.resize(0);

  // Create map with elements only on process zero
  Teuchos::RCP<map_type> ymap(new map_type(size(), v.size(), 0,
                                           _x->getMap()->getComm()));
  Teuchos::RCP<vector_type> y(new vector_type(ymap, 1));

  // Export from vector x to vector y
  Tpetra::Export<vector_type::local_ordinal_type,
                 vector_type::global_ordinal_type,
                 vector_type::node_type> exporter(_x->getMap(), ymap);

  y->doExport(*_x, exporter, Tpetra::INSERT);
  Teuchos::ArrayRCP<const double> yarr = y->getData(0);
  std::copy(yarr.get(), yarr.get() + v.size(), v.begin());
}
开发者ID:vincentqb,项目名称:dolfin,代码行数:23,代码来源:TpetraVector.cpp


示例19: assert

LCM::
Schwarz_BoundaryJacobian::
Schwarz_BoundaryJacobian(
    Teuchos::RCP<Teuchos_Comm const> const & comm,
    Teuchos::ArrayRCP<Teuchos::RCP<Albany::Application>> const & ca,
    Teuchos::Array<Teuchos::RCP<Tpetra_CrsMatrix>> jacs,
    int const this_app_index,
    int const coupled_app_index) :
        commT_(comm),
        coupled_apps_(ca),
        jacs_(jacs),
        this_app_index_(this_app_index),
        coupled_app_index_(coupled_app_index),
        b_use_transpose_(false),
        b_initialized_(false),
        n_models_(0)
{
  assert(0 <= this_app_index && this_app_index < ca.size());
  assert(0 <= coupled_app_index && coupled_app_index < ca.size());
  domain_map_ = ca[coupled_app_index]->getMapT();
  range_map_ = ca[this_app_index]->getMapT();
}
开发者ID:ImmutableLtd,项目名称:Albany,代码行数:22,代码来源:Schwarz_BoundaryJacobian.cpp


示例20: buildEvaluators

void
Albany::Helmholtz2DProblem::
buildProblem(
   Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >  meshSpecs,
   Albany::StateManager& stateMgr)
{
  /* Construct All Phalanx Evaluators */
  TEUCHOS_TEST_FOR_EXCEPTION(meshSpecs.size()!=1,std::logic_error,"Problem supports one Material Block");
  fm.resize(1);
  fm[0]  = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
  buildEvaluators(*fm[0], *meshSpecs[0], stateMgr, BUILD_RESID_FM, 
		  Teuchos::null);
  constructDirichletEvaluators(*meshSpecs[0]);
}
开发者ID:SailingFM,项目名称:Albany,代码行数:14,代码来源:Albany_Helmholtz2DProblem.cpp



注:本文中的teuchos::ArrayRCP类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ teuchos::ArrayView类代码示例发布时间:2022-05-31
下一篇:
C++ teuchos::Array类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap