当前位置: 首页>>代码示例>>C++>>正文


C++ BCUtils::constructBCEvaluators方法代码示例

本文整理汇总了C++中albany::BCUtils::constructBCEvaluators方法的典型用法代码示例。如果您正苦于以下问题:C++ BCUtils::constructBCEvaluators方法的具体用法?C++ BCUtils::constructBCEvaluators怎么用?C++ BCUtils::constructBCEvaluators使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在albany::BCUtils的用法示例。


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

示例1: neumannNames

void FELIX::Hydrology::constructNeumannEvaluators (const Teuchos::RCP<Albany::MeshSpecsStruct>& meshSpecs)
{
    // Note: we only enter this function if sidesets are defined in the mesh file
    // i.e. meshSpecs.ssNames.size() > 0

    Albany::BCUtils<Albany::NeumannTraits> nbcUtils;

    // Check to make sure that Neumann BCs are given in the input file
    if (!nbcUtils.haveBCSpecified(this->params))
    {
        return;
    }

    // Construct BC evaluators for all side sets and names
    // Note that the string index sets up the equation offset, so ordering is important

    std::vector<std::string> neumannNames(neq + 1);
    Teuchos::Array<Teuchos::Array<int> > offsets;
    offsets.resize(1);

    neumannNames[0] = "Hydraulic Potential";
    neumannNames[1] = "all";
    offsets[0].resize(1);
    offsets[0][0] = 0;

    // Construct BC evaluators for all possible names of conditions
    std::vector<std::string> condNames(1);
    condNames[0] = "neumann";

    nfm.resize(1); // FELIX problem only has one element block

    nfm[0] = nbcUtils.constructBCEvaluators(meshSpecs, neumannNames, dof_names, false, 0,
                                            condNames, offsets, dl,
                                            this->params, this->paramLib);
}
开发者ID:TheDylanViper,项目名称:Albany,代码行数:35,代码来源:FELIX_Hydrology.cpp

示例2: dirichletNames

//------------------------------------------------------------------------------
void
Albany::MechanicsProblem::
constructDirichletEvaluators(const Albany::MeshSpecsStruct& meshSpecs)
{

  // Construct Dirichlet evaluators for all nodesets and names
  std::vector<std::string> dirichletNames(neq);
  int index = 0;
  if (have_mech_eq_) {
    dirichletNames[index++] = "X";
    if (num_dims_ > 1) dirichletNames[index++] = "Y";
    if (num_dims_ > 2) dirichletNames[index++] = "Z";
  }

  if (have_temperature_eq_) dirichletNames[index++] = "T";
  if (have_pore_pressure_eq_) dirichletNames[index++] = "P";
  if (have_transport_eq_) dirichletNames[index++] = "C";
  if (have_hydrostress_eq_) dirichletNames[index++] = "TAU";
  if (have_damage_eq_) dirichletNames[index++] = "D";
  if (have_stab_pressure_eq_) dirichletNames[index++] = "SP";

  // Pass on the Application as well that is needed for
  // the coupled Schwarz BC. It is just ignored otherwise.
  Teuchos::RCP<Albany::Application> const &
  application = getApplication();

  this->params->set<Teuchos::RCP<Albany::Application>>(
      "Application", application);

  Albany::BCUtils<Albany::DirichletTraits> dirUtils;
  dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
      this->params, this->paramLib);

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

示例3: dirichletNames

//------------------------------------------------------------------------------
void
Albany::MechanicsProblem::
constructDirichletEvaluators(const Albany::MeshSpecsStruct& meshSpecs)
{

  // Construct Dirichlet evaluators for all nodesets and names
  std::vector<std::string> dirichletNames(neq);
  int index = 0;
  if (have_mech_eq_) {
    dirichletNames[index++] = "X";
    if (neq > 1) dirichletNames[index++] = "Y";
    if (neq > 2) dirichletNames[index++] = "Z";
  }

  if (have_temperature_eq_) dirichletNames[index++] = "T";
  if (have_pore_pressure_eq_) dirichletNames[index++] = "P";
  if (have_transport_eq_) dirichletNames[index++] = "C";
  if (have_hydrostress_eq_) dirichletNames[index++] = "TAU";
  if (have_damage_eq_) dirichletNames[index++] = "D";
  if (have_stab_pressure_eq_) dirichletNames[index++] = "SP";

  Albany::BCUtils<Albany::DirichletTraits> dirUtils;
  dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
      this->params, this->paramLib);
}
开发者ID:csamples,项目名称:Albany,代码行数:26,代码来源:MechanicsProblem.cpp

示例4: dirichletNames

void FELIX::Hydrology::constructDirichletEvaluators (const Albany::MeshSpecsStruct& meshSpecs)
{
    // Construct Dirichlet evaluators for all nodesets and names
    std::vector<std::string> dirichletNames(neq);
    dirichletNames[0] = dof_names[0];

    Albany::BCUtils<Albany::DirichletTraits> dirUtils;
    dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames, this->params, this->paramLib);
}
开发者ID:TheDylanViper,项目名称:Albany,代码行数:9,代码来源:FELIX_Hydrology.cpp

示例5:

//Neumann BCs
void
Albany::PNPProblem::constructNeumannEvaluators(const Teuchos::RCP<Albany::MeshSpecsStruct>& meshSpecs)
{

   // Note: we only enter this function if sidesets are defined in the mesh file
   // i.e. meshSpecs.ssNames.size() > 0
   
    Albany::BCUtils<Albany::NeumannTraits> nbcUtils;

   // Check to make sure that Neumann BCs are given in the input file

   if(!nbcUtils.haveBCSpecified(this->params)) {
      return;
   }

   // Construct BC evaluators for all side sets and names
   // Note that the string index sets up the equation offset, so ordering is important
   //
   // Currently we aren't exactly doing this right.  I think to do this
   // correctly we need different neumann evaluators for each DOF (velocity,
   // pressure, temperature, flux) since velocity is a vector and the 
   // others are scalars.  The dof_names stuff is only used
   // for robin conditions, so at this point, as long as we don't enable
   // robin conditions, this should work.
   
   std::vector<std::string> nbcNames;
   Teuchos::RCP< Teuchos::Array<std::string> > dof_names =
     Teuchos::rcp(new Teuchos::Array<std::string>);
   // TODO: arbitraty numSpecies
   Teuchos::Array<Teuchos::Array<int> > offsets;
   int idx = 0;
     nbcNames.push_back("C1");
     offsets.push_back(Teuchos::Array<int>(1,idx++));
     if (numSpecies>=2) {
       nbcNames.push_back("C2");
       offsets.push_back(Teuchos::Array<int>(1,idx++));
     }
     if (numSpecies==3) {
       nbcNames.push_back("C3");
       offsets.push_back(Teuchos::Array<int>(1,idx++));
     }
     nbcNames.push_back("Phi");
     offsets.push_back(Teuchos::Array<int>(1,idx++));
     dof_names->push_back("Concentration");
     dof_names->push_back("Potential");

   // Construct BC evaluators for all possible names of conditions
   // Should only specify flux vector components (dudx, dudy, dudz), or dudn, not both
   std::vector<std::string> condNames; //dudx, dudy, dudz, dudn, basal 


   nfm[0] = nbcUtils.constructBCEvaluators(meshSpecs, nbcNames,
                                           Teuchos::arcp(dof_names),
                                           true, 0, condNames, offsets, dl,
                                           this->params, this->paramLib);
}
开发者ID:dlonie,项目名称:Albany,代码行数:57,代码来源:Albany_PNPProblem.cpp

示例6: bcNames

// Dirichlet BCs
void
Albany::CahnHillProblem::constructDirichletEvaluators(const std::vector<std::string>& nodeSetIDs)
{
   // Construct BC evaluators for all node sets and names
   std::vector<std::string> bcNames(neq);
   bcNames[0] = "rho";
   Albany::BCUtils<Albany::DirichletTraits> bcUtils;
   dfm = bcUtils.constructBCEvaluators(nodeSetIDs, bcNames,
                                          this->params, this->paramLib);
}
开发者ID:adam727,项目名称:Albany,代码行数:11,代码来源:Albany_CahnHillProblem.cpp

示例7: dirichletNames

// Dirichlet BCs
void
Albany::PoissonsEquationProblem::constructDirichletEvaluators(
        const Albany::MeshSpecsStruct& meshSpecs)
{
  // Construct Dirichlet evaluators for all nodesets and names
  std::vector<std::string> dirichletNames(neq);
  dirichletNames[0] = "P";
  Albany::BCUtils<Albany::DirichletTraits> dirUtils;
  dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
                                       this->params, this->paramLib);
}
开发者ID:csamples,项目名称:Albany,代码行数:12,代码来源:PoissonsEquation.cpp

示例8: dirichletNames

void
Albany::PeridigmProblem::constructDirichletEvaluators(
        const Albany::MeshSpecsStruct& meshSpecs)
{
   // Construct Dirichlet evaluators for all nodesets and names
   std::vector<std::string> dirichletNames(neq);
   dirichletNames[0] = "X";
   if (neq>1) dirichletNames[1] = "Y";
   if (neq>2) dirichletNames[2] = "Z";
   Albany::BCUtils<Albany::DirichletTraits> dirUtils;
   dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames, this->params, this->paramLib);
}
开发者ID:arashafshar,项目名称:Albany,代码行数:12,代码来源:PeridigmProblem.cpp

示例9: dirichletNames

void
Albany::Helmholtz2DProblem::constructDirichletEvaluators(
        const Albany::MeshSpecsStruct& meshSpecs)
{
   // Construct Dirichlet evaluators for all nodesets and names
   std::vector<std::string> dirichletNames(neq);
   dirichletNames[0] = "U";
   dirichletNames[1] = "V";
   Albany::BCUtils<Albany::DirichletTraits> dirUtils;
   dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
                                          this->params, this->paramLib);
   offsets_ = dirUtils.getOffsets(); 
}
开发者ID:SailingFM,项目名称:Albany,代码行数:13,代码来源:Albany_Helmholtz2DProblem.cpp

示例10: bcNames

// Dirichlet BCs
void
Albany::HeatProblem::constructDirichletEvaluators(const std::vector<std::string>& nodeSetIDs)
{
   // Construct BC evaluators for all node sets and names
   std::vector<std::string> bcNames(neq);
   bcNames[0] = "T";
   Albany::BCUtils<Albany::DirichletTraits> bcUtils;
   dfm = bcUtils.constructBCEvaluators(nodeSetIDs, bcNames,
                                          this->params, this->paramLib);
   use_sdbcs_ = bcUtils.useSDBCs(); 
   offsets_ = bcUtils.getOffsets(); 
   nodeSetIDs_ = bcUtils.getNodeSetIDs();
}
开发者ID:gahansen,项目名称:Albany,代码行数:14,代码来源:Albany_HeatProblem.cpp

示例11: if

// Neumann BCs
void
Albany::HeatProblem::constructNeumannEvaluators(const Teuchos::RCP<Albany::MeshSpecsStruct>& meshSpecs)
{
   // Note: we only enter this function if sidesets are defined in the mesh file
   // i.e. meshSpecs.ssNames.size() > 0

   Albany::BCUtils<Albany::NeumannTraits> bcUtils;

   // Check to make sure that Neumann BCs are given in the input file

   if(!bcUtils.haveBCSpecified(this->params))

      return;

   // Construct BC evaluators for all side sets and names
   // Note that the string index sets up the equation offset, so ordering is important
   std::vector<std::string> bcNames(neq);
   Teuchos::ArrayRCP<std::string> dof_names(neq);
   Teuchos::Array<Teuchos::Array<int> > offsets;
   offsets.resize(neq);

   bcNames[0] = "T";
   dof_names[0] = "Temperature";
   offsets[0].resize(1);
   offsets[0][0] = 0;


   // Construct BC evaluators for all possible names of conditions
   // Should only specify flux vector components (dudx, dudy, dudz), or dudn, not both
   std::vector<std::string> condNames(5);
     //dudx, dudy, dudz, dudn, scaled jump (internal surface), or robin (like DBC plus scaled jump)

   // Note that sidesets are only supported for two and 3D currently
   if(numDim == 2)
    condNames[0] = "(dudx, dudy)";
   else if(numDim == 3)
    condNames[0] = "(dudx, dudy, dudz)";
   else
    TEUCHOS_TEST_FOR_EXCEPTION(true, Teuchos::Exceptions::InvalidParameter,
       std::endl << "Error: Sidesets only supported in 2 and 3D." << std::endl);

   condNames[1] = "dudn";
   condNames[2] = "scaled jump";
   condNames[3] = "robin";
   condNames[4] = "radiate";

   nfm.resize(1); // Heat problem only has one physics set
   nfm[0] = bcUtils.constructBCEvaluators(meshSpecs, bcNames, dof_names, false, 0,
                                  condNames, offsets, dl, this->params, this->paramLib, materialDB);

}
开发者ID:gahansen,项目名称:Albany,代码行数:52,代码来源:Albany_HeatProblem.cpp

示例12: dirichletNames

void
FELIX::StokesFO::constructDirichletEvaluators(
        const Albany::MeshSpecsStruct& meshSpecs)
{
   // Construct Dirichlet evaluators for all nodesets and names
   std::vector<std::string> dirichletNames(neq);
   for (int i=0; i<neq; i++) {
     std::stringstream s; s << "U" << i;
     dirichletNames[i] = s.str();
   }
   Albany::BCUtils<Albany::DirichletTraits> dirUtils;
   dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
                                          this->params, this->paramLib);
}
开发者ID:TheDylanViper,项目名称:Albany,代码行数:14,代码来源:FELIX_StokesFO.cpp

示例13: dirichletNames

void
Albany::GradientDamageProblem::constructDirichletEvaluators(
        const Albany::MeshSpecsStruct& meshSpecs)
{
  // Construct Dirichlet evaluators for all nodesets and names
  std::vector<std::string> dirichletNames(neq);
  dirichletNames[X_offset] = "X";
  if (numDim>1) dirichletNames[X_offset+1] = "Y";
  if (numDim>2) dirichletNames[X_offset+2] = "Z";
  dirichletNames[D_offset] = "D";
  Albany::BCUtils<Albany::DirichletTraits> dirUtils;
  dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
                                       this->params, this->paramLib);
}
开发者ID:TheDylanViper,项目名称:Albany,代码行数:14,代码来源:GradientDamageProblem.cpp

示例14: constructDirichletEvaluators

void Hydrology::constructDirichletEvaluators (const Albany::MeshSpecsStruct& meshSpecs)
{
  // Construct Dirichlet evaluators for all nodesets and names
  std::vector<std::string> dirichletNames(neq);
  dirichletNames[0] = dofs_names[0];
  if (!eliminate_h) {
    dirichletNames[1] = dofs_names[1];
  }

  Albany::BCUtils<Albany::DirichletTraits> dirUtils;
  dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames, this->params, this->paramLib);
  offsets_ = dirUtils.getOffsets();
  nodeSetIDs_ = dirUtils.getNodeSetIDs();
}
开发者ID:gahansen,项目名称:Albany,代码行数:14,代码来源:LandIce_Hydrology.cpp

示例15: dirichletNames

void
Albany::ComprNSProblem::constructDirichletEvaluators(
        const Albany::MeshSpecsStruct& meshSpecs)
{
   // Construct Dirichlet evaluators for all nodesets and names
   std::vector<std::string> dirichletNames(neq);
   for (int i=0; i<neq; i++) {
     std::stringstream s; s << "qFluct" << i;
     dirichletNames[i] = s.str();
   }
   Albany::BCUtils<Albany::DirichletTraits> dirUtils;
   dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
                                          this->params, this->paramLib);
   offsets_ = dirUtils.getOffsets(); 
}
开发者ID:SailingFM,项目名称:Albany,代码行数:15,代码来源:Albany_ComprNSProblem.cpp


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