void NuTo::Structure::InterpolationTypeAdd(int rInterpolationTypeId, NuTo::Node::eDof rDofType, NuTo::Interpolation::eTypeOrder rTypeOrder, const Eigen::VectorXi& rDegree, const std::vector<Eigen::VectorXd>& rKnots, const Eigen::MatrixXd& rWeights) { InterpolationType* interpolationType = InterpolationTypeGet(rInterpolationTypeId); interpolationType->AddDofInterpolation(rDofType, rTypeOrder, rDegree, rKnots, rWeights); eIntegrationType integrationTypeEnum = interpolationType->GetStandardIntegrationType(); const IntegrationTypeBase& integrationType = *this->GetPtrIntegrationType(integrationTypeEnum); interpolationType->ClearCache(); // update all elements // disable show time bool showTime = GetShowTime(); SetShowTime(false); int elementGroupId = GroupCreate("Elements"); GroupAddElementFromType(elementGroupId, rInterpolationTypeId); for (int elementId : GroupGetMemberIds(elementGroupId)) { ElementBase* element = ElementGetElementPtr(elementId); element->SetIntegrationType(integrationType); } GroupDelete(elementGroupId); UpdateDofStatus(); SetShowTime(showTime); }
void NuTo::Structure::InterpolationTypeAdd( int rInterpolationTypeId, NuTo::Node::eDof rDofType, NuTo::Interpolation::eTypeOrder rTypeOrder = Interpolation::eTypeOrder::EQUIDISTANT1) { InterpolationType& interpolationType = *InterpolationTypeGet(rInterpolationTypeId); interpolationType.AddDofInterpolation(rDofType, rTypeOrder); eIntegrationType integrationTypeEnum = interpolationType.GetStandardIntegrationType(); const IntegrationTypeBase& integrationType = *this->GetPtrIntegrationType(integrationTypeEnum); interpolationType.ClearCache(); // update all elements // disable show time bool showTime = GetShowTime(); SetShowTime(false); int elementGroupId = GroupCreate(eGroupId::Elements); GroupAddElementFromType(elementGroupId, rInterpolationTypeId); for (int elementId : GroupGetMemberIds(elementGroupId)) { ElementBase* element = ElementGetElementPtr(elementId); element->SetIntegrationType(integrationType); } GroupDelete(elementGroupId); UpdateDofStatus(); SetShowTime(showTime); }
void NuTo::Structure::InterpolationTypeSetIntegrationType(int rInterpolationTypeId, IntegrationTypeBase* rIntegrationType) { InterpolationType* interpolationType = InterpolationTypeGet(rInterpolationTypeId); interpolationType->ClearCache(); // update all elements // disable show time bool showTime = GetShowTime(); SetShowTime(false); int elementGroupId = GroupCreate("Elements"); GroupAddElementFromType(elementGroupId, rInterpolationTypeId); for (int elementId : GroupGetMemberIds(elementGroupId)) { ElementBase* element = ElementGetElementPtr(elementId); element->SetIntegrationType(*rIntegrationType); } GroupDelete(elementGroupId); SetShowTime(showTime); }