本文整理汇总了C++中albany::BCUtils::getOffsets方法的典型用法代码示例。如果您正苦于以下问题:C++ BCUtils::getOffsets方法的具体用法?C++ BCUtils::getOffsets怎么用?C++ BCUtils::getOffsets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类albany::BCUtils
的用法示例。
在下文中一共展示了BCUtils::getOffsets方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
offsets_ = dirUtils.getOffsets();
}
示例2: 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);
offsets_ = dirUtils.getOffsets();
}
示例3: 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();
}
示例4: 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();
}
示例5: dirichletNames
// Dirichlet BCs
void
Albany::LinearElasticityProblem::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);
offsets_ = dirUtils.getOffsets();
}
示例6: dirichletNames
void
FELIX::StokesL1L2::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);
offsets_ = dirUtils.getOffsets();
}
示例7: dirichletNames
void
Albany::ThermoMechanicalProblem::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[T_offset] = "T";
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
this->params, this->paramLib);
offsets_ = dirUtils.getOffsets();
}
示例8: bcNames
// Dirichlet BCs
void
Albany::HydrideProblem::constructDirichletEvaluators(const std::vector<std::string>& nodeSetIDs)
{
// Construct BC evaluators for all node sets and names
std::vector<std::string> bcNames(neq);
bcNames[0] = "X";
if (numDim>1) bcNames[1] = "Y";
if (numDim>2) bcNames[2] = "Z";
bcNames[numDim] = "c";
bcNames[numDim+1] = "w";
Albany::BCUtils<Albany::DirichletTraits> bcUtils;
dfm = bcUtils.constructBCEvaluators(nodeSetIDs, bcNames,
this->params, this->paramLib);
offsets_ = bcUtils.getOffsets();
}
示例9: dirichletNames
void
FELIX::Stokes::constructDirichletEvaluators(
const Albany::MeshSpecsStruct& meshSpecs)
{
// Construct Dirichlet evaluators for all nodesets and names
std::vector<std::string> dirichletNames(neq);
int index = 0;
if (haveFlowEq) {
dirichletNames[index++] = "ux";
if (numDim>=2) dirichletNames[index++] = "uy";
if (numDim==3) dirichletNames[index++] = "uz";
dirichletNames[index++] = "p";
}
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
this->params, this->paramLib);
offsets_ = dirUtils.getOffsets();
}
示例10: dirichletNames
void
Albany::PNPProblem::constructDirichletEvaluators(
const Albany::MeshSpecsStruct& meshSpecs)
{
// Construct Dirichlet evaluators for all nodesets and names
std::vector<std::string> dirichletNames(neq);
int idx = 0;
for(idx = 0; idx<numSpecies; idx++) {
std::stringstream s; s << "C" << (idx+1);
dirichletNames[idx] = s.str();
}
dirichletNames[idx++] = "Phi";
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
this->params, this->paramLib);
use_sdbcs_ = dirUtils.useSDBCs();
offsets_ = dirUtils.getOffsets();
nodeSetIDs_ = dirUtils.getNodeSetIDs();
}
示例11: dirichletNames
//------------------------------------------------------------------------------
void
Albany::ElectroMechanicsProblem::
constructDirichletEvaluators(const Albany::MeshSpecsStruct& meshSpecs)
{
// Construct Dirichlet evaluators for all nodesets and names
std::vector<std::string> dirichletNames(neq);
int index = 0;
dirichletNames[index++] = "X";
if (num_dims_ > 1) dirichletNames[index++] = "Y";
if (num_dims_ > 2) dirichletNames[index++] = "Z";
dirichletNames[index++] = "Potential";
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
this->params, this->paramLib);
offsets_ = dirUtils.getOffsets();
}
示例12: dirichletNames
void
Albany::NavierStokes::constructDirichletEvaluators(
const std::vector<std::string>& nodeSetIDs)
{
// Construct Dirichlet evaluators for all nodesets and names
std::vector<std::string> dirichletNames(neq);
int index = 0;
if (haveFlowEq) {
dirichletNames[index++] = "ux";
if (numDim>=2) dirichletNames[index++] = "uy";
if (numDim==3) dirichletNames[index++] = "uz";
dirichletNames[index++] = "p";
}
if (haveHeatEq) dirichletNames[index++] = "T";
if (haveNeutEq) dirichletNames[index++] = "phi";
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(nodeSetIDs, dirichletNames,
this->params, this->paramLib);
offsets_ = dirUtils.getOffsets();
}
示例13: dirichletNames
void
Tsunami::Boussinesq::constructDirichletEvaluators(
const Albany::MeshSpecsStruct& meshSpecs)
{
// Construct Dirichlet evaluators for all nodesets and names
std::vector<std::string> dirichletNames(neq);
int index = 0;
dirichletNames[index++] = "eta";
dirichletNames[index++] = "ualpha";
if (numDim > 1)
dirichletNames[index++] = "valpha";
dirichletNames[index++] = "E1";
if (numDim > 1)
dirichletNames[index++] = "E2";
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
this->params, this->paramLib);
use_sdbcs_ = dirUtils.useSDBCs();
offsets_ = dirUtils.getOffsets();
nodeSetIDs_ = dirUtils.getNodeSetIDs();
}
示例14: dirichletNames
void
Aeras::XScalarAdvectionProblem::constructDirichletEvaluators(
const Albany::MeshSpecsStruct& meshSpecs)
{
// Construct Dirichlet evaluators for all nodesets and names
std::vector<std::string> dirichletNames(numLevels*(1+numTracers));
std::ostringstream s;
for (int i=0,n=0; i<numLevels; ++i) {
s.str(std::string());
s << "rho_"<<i;
dirichletNames[n++] = s.str();
for (int j=0; j<numTracers; ++j) {
s.str(std::string());
s << dof_names_tracers[j] <<"_"<<i;
dirichletNames[n++] = s.str();
}
}
Albany::BCUtils<Albany::DirichletTraits> dirUtils;
dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames,
dirichletNames,
this->params,
this->paramLib);
offsets_ = dirUtils.getOffsets();
}