本文整理汇总了C++中meshlib::Mesh::isAxiallySymmetric方法的典型用法代码示例。如果您正苦于以下问题:C++ Mesh::isAxiallySymmetric方法的具体用法?C++ Mesh::isAxiallySymmetric怎么用?C++ Mesh::isAxiallySymmetric使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类meshlib::Mesh
的用法示例。
在下文中一共展示了Mesh::isAxiallySymmetric方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initializeConcreteProcess
void HTProcess::initializeConcreteProcess(
NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh,
unsigned const integration_order)
{
// For the staggered scheme, both processes are assumed to use the same
// element order. Therefore the order of shape function can be fetched from
// any set of the sets of process variables of the coupled processes. Here,
// we take the one from the first process by setting process_id = 0.
const int process_id = 0;
ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
if (_use_monolithic_scheme)
{
ProcessLib::createLocalAssemblers<MonolithicHTFEM>(
mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order,
*_material_properties);
}
else
{
ProcessLib::createLocalAssemblers<StaggeredHTFEM>(
mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, *_material_properties,
_heat_transport_process_id, _hydraulic_process_id);
}
_secondary_variables.addSecondaryVariable(
"darcy_velocity",
makeExtrapolator(mesh.getDimension(), getExtrapolator(),
_local_assemblers,
&HTLocalAssemblerInterface::getIntPtDarcyVelocity));
}
示例2: initializeConcreteProcess
void HeatTransportBHEProcess::initializeConcreteProcess(
NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh,
unsigned const integration_order)
{
// Quick access map to BHE's through element ids.
std::unordered_map<std::size_t, BHE::BHETypes*> element_to_bhe_map;
int const n_BHEs = _process_data._vec_BHE_property.size();
for (int i = 0; i < n_BHEs; i++)
{
auto const& bhe_elements = _bheMeshData.BHE_elements[i];
for (auto const& e : bhe_elements)
{
element_to_bhe_map[e->getID()] =
&_process_data._vec_BHE_property[i];
}
}
assert(mesh.getDimension() == 3);
ProcessLib::HeatTransportBHE::createLocalAssemblers<
HeatTransportBHELocalAssemblerSoil, HeatTransportBHELocalAssemblerBHE>(
mesh.getElements(), dof_table, _local_assemblers, element_to_bhe_map,
mesh.isAxiallySymmetric(), integration_order, _process_data);
// Create BHE boundary conditions for each of the BHEs
createBHEBoundaryConditionTopBottom(_bheMeshData.BHE_nodes);
}
示例3: initializeConcreteProcess
void RichardsComponentTransportProcess::initializeConcreteProcess(
NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh,
unsigned const integration_order)
{
const int monolithic_process_id = 0;
ProcessLib::ProcessVariable const& pv =
getProcessVariables(monolithic_process_id)[0];
ProcessLib::createLocalAssemblers<LocalAssemblerData>(
mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, _process_data);
_secondary_variables.addSecondaryVariable(
"darcy_velocity",
makeExtrapolator(mesh.getDimension(), getExtrapolator(),
_local_assemblers,
&RichardsComponentTransportLocalAssemblerInterface::
getIntPtDarcyVelocity));
_secondary_variables.addSecondaryVariable(
"saturation",
makeExtrapolator(1, getExtrapolator(), _local_assemblers,
&RichardsComponentTransportLocalAssemblerInterface::
getIntPtSaturation));
}
示例4: SourceTerm
VolumetricSourceTerm::VolumetricSourceTerm(
MeshLib::Mesh const& source_term_mesh,
std::unique_ptr<NumLib::LocalToGlobalIndexMap> source_term_dof_table,
unsigned const integration_order, unsigned const shapefunction_order,
Parameter<double> const& volumetric_source_term)
: SourceTerm(std::move(source_term_dof_table)),
_volumetric_source_term(volumetric_source_term)
{
ProcessLib::createLocalAssemblers<VolumetricSourceTermLocalAssembler>(
source_term_mesh.getDimension(), source_term_mesh.getElements(),
*_source_term_dof_table, shapefunction_order, _local_assemblers,
source_term_mesh.isAxiallySymmetric(), integration_order,
_volumetric_source_term);
}
示例5: ExtrapolationTestProcess
ExtrapolationTestProcess(MeshLib::Mesh const& mesh,
unsigned const integration_order)
: _integration_order(integration_order),
_mesh_subset_all_nodes(mesh, mesh.getNodes())
{
std::vector<MeshLib::MeshSubset> all_mesh_subsets{
_mesh_subset_all_nodes};
_dof_table = std::make_unique<NumLib::LocalToGlobalIndexMap>(
std::move(all_mesh_subsets), NumLib::ComponentOrder::BY_COMPONENT);
// Passing _dof_table works, because this process has only one variable
// and the variable has exactly one component.
_extrapolator =
std::make_unique<ExtrapolatorImplementation>(*_dof_table);
// createAssemblers(mesh);
ProcessLib::createLocalAssemblers<LocalAssemblerData>(
mesh.getDimension(), mesh.getElements(), *_dof_table, 1,
_local_assemblers, mesh.isAxiallySymmetric(), _integration_order);
}
示例6: makeExtrapolator
void PhaseFieldProcess<DisplacementDim>::initializeConcreteProcess(
NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh,
unsigned const integration_order)
{
ProcessLib::SmallDeformation::createLocalAssemblers<
DisplacementDim, PhaseFieldLocalAssembler>(
mesh.getElements(), dof_table, _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, _process_data);
_secondary_variables.addSecondaryVariable(
"sigma",
makeExtrapolator(MathLib::KelvinVector::KelvinVectorType<
DisplacementDim>::RowsAtCompileTime,
getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtSigma));
_secondary_variables.addSecondaryVariable(
"epsilon",
makeExtrapolator(MathLib::KelvinVector::KelvinVectorType<
DisplacementDim>::RowsAtCompileTime,
getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtEpsilon));
}
示例7: DBUG
SurfaceFlux::SurfaceFlux(
MeshLib::Mesh& boundary_mesh,
std::size_t bulk_property_number_of_components,
unsigned const integration_order)
{
DBUG("Create local balance assemblers.");
// Populate the vector of local assemblers.
_local_assemblers.resize(boundary_mesh.getElements().size());
// needed to create dof table
auto mesh_subset_all_nodes = std::make_unique<MeshLib::MeshSubset>(
boundary_mesh, boundary_mesh.getNodes());
// Collect the mesh subsets in a vector.
std::vector<MeshLib::MeshSubset> all_mesh_subsets;
std::generate_n(std::back_inserter(all_mesh_subsets),
bulk_property_number_of_components,
[&]() { return *mesh_subset_all_nodes; });
// needed for creation of local assemblers
auto dof_table = std::make_unique<NumLib::LocalToGlobalIndexMap const>(
std::move(all_mesh_subsets), NumLib::ComponentOrder::BY_LOCATION);
auto const bulk_element_ids =
boundary_mesh.getProperties().template getPropertyVector<std::size_t>(
"bulk_element_ids", MeshLib::MeshItemType::Cell, 1);
auto const bulk_face_ids =
boundary_mesh.getProperties().template getPropertyVector<std::size_t>(
"bulk_face_ids", MeshLib::MeshItemType::Cell, 1);
ProcessLib::createLocalAssemblers<SurfaceFluxLocalAssembler>(
boundary_mesh.getDimension() + 1, // or bulk_mesh.getDimension()?
boundary_mesh.getElements(), *dof_table, 1, _local_assemblers,
boundary_mesh.isAxiallySymmetric(), integration_order,
*bulk_element_ids, *bulk_face_ids);
}
示例8: LocalToGlobalIndexMap
void ThermoMechanicsProcess<DisplacementDim>::initializeConcreteProcess(
NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh,
unsigned const integration_order)
{
ProcessLib::SmallDeformation::createLocalAssemblers<
DisplacementDim, ThermoMechanicsLocalAssembler>(
mesh.getElements(), dof_table, _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, _process_data);
// TODO move the two data members somewhere else.
// for extrapolation of secondary variables
std::vector<MeshLib::MeshSubset> all_mesh_subsets_single_component{
*_mesh_subset_all_nodes};
_local_to_global_index_map_single_component.reset(
new NumLib::LocalToGlobalIndexMap(
std::move(all_mesh_subsets_single_component),
// by location order is needed for output
NumLib::ComponentOrder::BY_LOCATION));
_secondary_variables.addSecondaryVariable(
"sigma",
makeExtrapolator(
MathLib::KelvinVector::KelvinVectorType<
DisplacementDim>::RowsAtCompileTime,
getExtrapolator(), _local_assemblers,
&ThermoMechanicsLocalAssemblerInterface::getIntPtSigma));
_secondary_variables.addSecondaryVariable(
"epsilon",
makeExtrapolator(
MathLib::KelvinVector::KelvinVectorType<
DisplacementDim>::RowsAtCompileTime,
getExtrapolator(), _local_assemblers,
&ThermoMechanicsLocalAssemblerInterface::getIntPtEpsilon));
// Set initial conditions for integration point data.
for (auto const& ip_writer : _integration_point_writer)
{
// Find the mesh property with integration point writer's name.
auto const& name = ip_writer->name();
if (!mesh.getProperties().existsPropertyVector<double>(name))
{
continue;
}
auto const& mesh_property =
*mesh.getProperties().template getPropertyVector<double>(name);
// The mesh property must be defined on integration points.
if (mesh_property.getMeshItemType() !=
MeshLib::MeshItemType::IntegrationPoint)
{
continue;
}
auto const ip_meta_data = getIntegrationPointMetaData(mesh, name);
// Check the number of components.
if (ip_meta_data.n_components != mesh_property.getNumberOfComponents())
{
OGS_FATAL(
"Different number of components in meta data (%d) than in "
"the integration point field data for '%s': %d.",
ip_meta_data.n_components, name.c_str(),
mesh_property.getNumberOfComponents());
}
// Now we have a properly named vtk's field data array and the
// corresponding meta data.
std::size_t position = 0;
for (auto& local_asm : _local_assemblers)
{
std::size_t const integration_points_read =
local_asm->setIPDataInitialConditions(
name, &mesh_property[position],
ip_meta_data.integration_order);
if (integration_points_read == 0)
{
OGS_FATAL(
"No integration points read in the integration point "
"initial conditions set function.");
}
position += integration_points_read * ip_meta_data.n_components;
}
}
}
示例9: if
void SmallDeformationNonlocalProcess<DisplacementDim>::
initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh,
unsigned const integration_order)
{
// Reusing local assembler creation code.
ProcessLib::SmallDeformation::createLocalAssemblers<
DisplacementDim, SmallDeformationNonlocalLocalAssembler>(
mesh.getElements(), dof_table, _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, _process_data);
// TODO move the two data members somewhere else.
// for extrapolation of secondary variables
std::vector<MeshLib::MeshSubset> all_mesh_subsets_single_component{
*_mesh_subset_all_nodes};
_local_to_global_index_map_single_component =
std::make_unique<NumLib::LocalToGlobalIndexMap>(
std::move(all_mesh_subsets_single_component),
// by location order is needed for output
NumLib::ComponentOrder::BY_LOCATION);
Process::_secondary_variables.addSecondaryVariable(
"sigma",
makeExtrapolator(MathLib::KelvinVector::KelvinVectorType<
DisplacementDim>::RowsAtCompileTime,
getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtSigma));
Process::_secondary_variables.addSecondaryVariable(
"epsilon",
makeExtrapolator(MathLib::KelvinVector::KelvinVectorType<
DisplacementDim>::RowsAtCompileTime,
getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtEpsilon));
Process::_secondary_variables.addSecondaryVariable(
"eps_p_V",
makeExtrapolator(1, getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtEpsPV));
Process::_secondary_variables.addSecondaryVariable(
"eps_p_D_xx",
makeExtrapolator(1, getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtEpsPDXX));
Process::_secondary_variables.addSecondaryVariable(
"damage",
makeExtrapolator(1, getExtrapolator(), _local_assemblers,
&LocalAssemblerInterface::getIntPtDamage));
GlobalExecutor::executeMemberOnDereferenced(
&LocalAssemblerInterface::nonlocal, _local_assemblers,
_local_assemblers);
// Set initial conditions for integration point data.
for (auto const& ip_writer : _integration_point_writer)
{
auto const& name = ip_writer->name();
// First check the field data, which is used for restart.
if (mesh.getProperties().existsPropertyVector<double>(name))
{
auto const& mesh_property =
*mesh.getProperties().template getPropertyVector<double>(name);
// The mesh property must be defined on integration points.
if (mesh_property.getMeshItemType() !=
MeshLib::MeshItemType::IntegrationPoint)
{
continue;
}
auto const ip_meta_data = getIntegrationPointMetaData(mesh, name);
// Check the number of components.
if (ip_meta_data.n_components !=
mesh_property.getNumberOfComponents())
{
OGS_FATAL(
"Different number of components in meta data (%d) than in "
"the integration point field data for '%s': %d.",
ip_meta_data.n_components, name.c_str(),
mesh_property.getNumberOfComponents());
}
// Now we have a properly named vtk's field data array and the
// corresponding meta data.
std::size_t position = 0;
for (auto& local_asm : _local_assemblers)
{
std::size_t const integration_points_read =
local_asm->setIPDataInitialConditions(
name, &mesh_property[position],
ip_meta_data.integration_order);
if (integration_points_read == 0)
{
OGS_FATAL(
"No integration points read in the integration point "
"initial conditions set function.");
}
position += integration_points_read * ip_meta_data.n_components;
}
//.........这里部分代码省略.........