gismo调试-组总刚

文章目录


前言

只是为方便学习,不做其他用途,

一、

1 组总刚main文件的断点

    //=============================================//
			  // Assembling & solving //
	//=============================================//

	// creating assembler
	gsElasticityAssembler<real_t> assembler(geometry, basis, bcInfo, g);
	assembler.options().setReal("YoungsModulus", youngsModulus);
	assembler.options().setReal("PoissonsRatio", poissonsRatio);
	gsInfo << "Assembling...\n";
	gsStopwatch clock;
	clock.restart();
	assembler.assemble();

在这里插入图片描述

2 跳转到gsElasticityAssembler.hpp

147行:gsElasticityAssembler::assemble(bool saveEliminationMatrix)函数

//--------------------- SYSTEM ASSEMBLY ----------------------------------//

template<class T>
void gsElasticityAssembler<T>::assemble(bool saveEliminationMatrix)
{
    m_system.matrix().setZero();
    reserve();
    m_system.rhs().setZero();

    // Compute volumetric integrals and write to the global linear system计算体积积分并写入全局线性系统
    if (m_bases.size() == unsigned(m_dim)) // displacement formulation
    {
        GISMO_ENSURE(m_options.getInt("MaterialLaw") == material_law::hooke,
                     "Material law not specified OR not supported! Material law = "<<m_options.getInt("MaterialLaw"));
        if (saveEliminationMatrix)
        {
            eliminationMatrix.resize(Base::numDofs(),Base::numFixedDofs());
            eliminationMatrix.setZero();
            eliminationMatrix.reservePerColumn(m_system.numColNz(m_bases[0],m_options));
        }

        // if !composite

        // else


        if (m_materialMat!=NULL)
        {
            gsVisitorLinearElasticityMM<T> visitor(*m_pde_ptr,m_materialMat, saveEliminationMatrix ? &eliminationMatrix : nullptr);
            Base::template push<gsVisitorLinearElasticityMM<T> >(visitor);
        }
        else
        {
            gsVisitorLinearElasticity<T> visitor(*m_pde_ptr, saveEliminationMatrix ? &eliminationMatrix : nullptr);
            Base::template push<gsVisitorLinearElasticity<T> >(visitor);
        }

        if (saveEliminationMatrix)
        {
            Base::rhsWithZeroDDofs = m_system.rhs();
            eliminationMatrix.makeCompressed();
        }

    }
    else // mixed formulation (displacement + pressure)
    {
        GISMO_ENSURE(m_options.getInt("MaterialLaw") == material_law::mixed_hooke,
                     "Material law not specified OR not supported!");
        gsVisitorMixedLinearElasticity<T> visitor(*m_pde_ptr);
        Base::template push<gsVisitorMixedLinearElasticity<T> >(visitor);
    }

    // Compute surface integrals and write to the global rhs vector
    Base::template push<gsVisitorElasticityNeumann<T> >(m_pde_ptr->bc().neumannSides());

    m_system.matrix().makeCompressed();
}

在这里插入图片描述

3 gsElasticityAssembler.hpp的177行进入gsVisitorLinearElasticity.h

在这里插入图片描述

在这里插入图片描述

inline void assemble(gsDomainIterator<T> & element,
                         const gsVector<T> & quWeights)
    {
        // initialize local matrix and rhs
        localMat.setZero(dim*N_D,dim*N_D);
        localRhs.setZero(dim*N_D,1);
        // Loop over the quadrature nodes
        for (index_t q = 0; q < quWeights.rows(); ++q)
        {
            // Multiply quadrature weight by the geometry measure
            const T weightForce = quWeights[q] * md.measure(q);
            const T weightBody = quWeights[q] * pow(md.measure(q),1-localStiffening);
            // Compute physical gradients of basis functions at q as a dim x numActiveFunction matrix
            transformGradients(md,q,basisValuesDisp[1],physGrad);
            // loop over active basis functions (v_j)
            for (index_t i = 0; i < N_D; i++)
            {
                // stiffness matrix K = B_i^T * C * B_j;
                setB<T>(B_i,I,physGrad.col(i));
                tempK = B_i.transpose() * C; //.reshapeCol(q,dim,dim)
                // loop over active basis functions (v_j)
                for (index_t j = 0; j < N_D; j++)
                {
                    setB<T>(B_j,I,physGrad.col(j));
                    K = tempK * B_j;
                    for (short_t di = 0; di < dim; ++di)
                        for (short_t dj = 0; dj < dim; ++dj)
                            localMat(di*N_D+i,dj*N_D+j) += weightBody * K(di,dj);
                }
            }
            // rhs contribution
            for (short_t d = 0; d < dim; ++d)
                localRhs.middleRows(d*N_D,N_D).noalias() += weightForce * forceScaling * forceValues(d,q) * basisValuesDisp[0].col(q) ;
        }
    }

4 进入gsAssembler.h

在这里插入图片描述

gsVisitorLinearElasticity.h的119行结束进入gsAssembler.h

在这里插入图片描述

template <class T>
template<class ElementVisitor>
void gsAssembler<T>::apply(ElementVisitor & visitor,
                           size_t patchIndex,
                           boxSide side)
{
    //gsDebug<< "Apply to patch "<< patchIndex <<"("<< side <<")\n";

    const gsBasisRefs<T> bases(m_bases, patchIndex);

#pragma omp parallel
{
    gsQuadRule<T> quRule ; // Quadrature rule
    gsMatrix<T> quNodes  ; // Temp variable for mapped nodes
    gsVector<T> quWeights; // Temp variable for mapped weights

    ElementVisitor
#ifdef _OPENMP
    // Create thread-private visitor
    visitor_(visitor);
    const int tid = omp_get_thread_num();
    const int nt  = omp_get_num_threads();
#else
    &visitor_ = visitor;
#endif

    // Initialize reference quadrature rule and visitor data
    visitor_.initialize(bases, patchIndex, m_options, quRule);

    const gsGeometry<T> & patch = m_pde_ptr->patches()[patchIndex];

    // Initialize domain element iterator -- using unknown 0
    typename gsBasis<T>::domainIter domIt = bases[0].makeDomainIterator(side);

    // Start iteration over elements
#ifdef _OPENMP
    for ( domIt->next(tid); domIt->good(); domIt->next(nt) )
#else
    for (; domIt->good(); domIt->next() )
#endif
    {
        // Map the Quadrature rule to the element
        quRule.mapTo( domIt->lowerCorner(), domIt->upperCorner(), quNodes, quWeights );

        // Perform required evaluations on the quadrature nodes
        visitor_.evaluate(bases, patch, quNodes);

        // Assemble on element
        visitor_.assemble(*domIt, quWeights);

        // Push to global matrix and right-hand side vector
#pragma omp critical(localToGlobal)
        visitor_.localToGlobal(patchIndex, m_ddof, m_system); // omp_locks inside
    }
}//omp parallel

}

重新进入gsVisitorLinearElasticity.h

进入函数:inline void localToGlobal

在这里插入图片描述

PushToMatrix 推出一个局部矩阵,该矩阵由若干块组成,这些块对应于全局系统的各个块

进入gsSparseSystem.h

进入gsSparseSystem.h函数816行:void pushToMatrix

在这里插入图片描述

/**
     * @brief pushToMatrix pushes one local matrix consisting of several blocks corresponding to blocks of the global system
     * \note
     * 1. Usefull for bilinear forms depending on vector valued functions
     * 2. different index sets are used for row and column blocks
     * 3. eliminated dofs are incorporated in the right way
     * 4. assume identical row and column mappers for the global system, therefore only one vector of mapped index sets is given
     * @param[in] localMat local system matrix
     * @param[in] actives_vec a vector of mapped index sets (for ALL blocks of the global system), accessed via \a actives_vec[\a r_vec(i)]
     * @param[in] eliminatedDofs a vector of values for the dofs (corresponding to the columns) that are eliminated from the system
     *            (for ALL blocks of the global system), accessed via \a eliminatedDofs[\a r_vec(i)]
     * @param[in] r_vec a vector of row block indices to which the local matrix is pushed
     * @param[in] c_vec a vector of column block indices to which the local matrix is pushed
     */
    void pushToMatrix(const gsMatrix<T> & localMat,
                      const std::vector<gsMatrix<index_t> >& actives_vec,
                      const std::vector<gsMatrix<T> > & eliminatedDofs,
                      const gsVector<index_t> & r_vec,
                      const gsVector<index_t> & c_vec)
    {
        int rstrLocal = 0;
        int cstrLocal = 0;

        for (index_t r_ind = 0; r_ind != r_vec.size(); ++r_ind) // for row-blocks
        {
            size_t r = r_vec(r_ind);
            const gsDofMapper & rowMap    = m_mappers[m_row.at(r)];
            const index_t numActive_i = actives_vec[r].rows();

            for (index_t c_ind = 0; c_ind != c_vec.size(); ++c_ind) // for col-blocks
            {
                size_t c = c_vec(c_ind);
                const gsDofMapper & colMap    = m_mappers[m_col.at(c)];
                const index_t numActive_j = actives_vec[c].rows();
                const gsMatrix<T> & eliminatedDofs_j = eliminatedDofs[c];

                for (index_t i = 0; i != numActive_i; ++i) // N_i
                {
                    const int ii =  m_rstr.at(r) + actives_vec[r].at(i); // row index global matrix
                    const int iiLocal = rstrLocal + i;                   // row index local matrix

                    if ( rowMap.is_free_index(actives_vec[r].at(i)) )
                    {

                        for (index_t j = 0; j != numActive_j; ++j) // N_j
                        {
                            const int jj =  m_cstr.at(c) + actives_vec[c].at(j); // column index global matrix
                            const int jjLocal = cstrLocal + j;                   // column index local matrix

                            if ( colMap.is_free_index(actives_vec[c].at(j)) )
                            {
                                // If matrix is symmetric, we store only lower
                                // triangular part
                                if ( (!symm) || jj <= ii )
                                    m_matrix.coeffRef(ii, jj) += localMat(iiLocal, jjLocal);
                            }
                            else // Fixed DoF
                            {
                                m_rhs.row(ii).noalias() -= localMat(iiLocal, jjLocal) * eliminatedDofs_j.row( colMap.global_to_bindex(actives_vec[c].at(j)));
                            }
                        }
                    }
                }
                cstrLocal += numActive_j;
            }
            cstrLocal = 0;
            rstrLocal += numActive_i;
        }

    }

gsSparseSystem.h函数816行:void pushToMatrix结束后进入gsVisitorLinearElasticity.h 的函数inline void localToGlobal的135行

在这里插入图片描述
在这里插入图片描述

进入gsAssembler.h的718行
在这里插入图片描述

进入gsAssembler.h的455行函数
遍历域的所有单元并应用

    template<class ElementVisitor>
    void push(const ElementVisitor & visitor)

在这里插入图片描述

gsElasticityAssembler.hpp中 gsElasticityAssembler::assemble(bool saveEliminationMatrix) 函数运行完200行结束:

在这里插入图片描述

进入到主程序文件中:

在这里插入图片描述

gsElasticityAssembler.hpp

1.1

gsSparseSystem.h函数816行:void pushToMatrix结束后进入gsVisitorLinearElasticity.h 的函数inline void localToGlobal的135行

4 进入gsAssembler.h

1.2

1.3

1.4

二、

2.1

2.2

2.3

<f

2.4

代码

/// This is the 2D linear elasticity benchmark "Infinite plate with circular hole"
/// as described in V.P.Nguyen, C.Anitescu, S.P.A.Bordas, T.Rabczuk, 2015
/// "Isogeometric analysis: An overview and computer implementation aspects".
///
/// Author: A.Shamanskiy (2016 - ...., TU Kaiserslautern)
#include <gismo.h>
#include <gsElasticity/gsElasticityAssembler.h>
#include <gsElasticity/gsWriteParaviewMultiPhysics.h>

using namespace gismo;

int main(int argc, char* argv[]) {

	gsInfo << "This is the 2D linear elasticity benchmark: infinite plate with circular hole.\n";

	//=====================================//
				// Input //
	//=====================================//

	std::string filename = "plateWithHole.xml";
	index_t numUniRef = 0;
	index_t numDegElev = 0;
	index_t numPlotPoints = 10000;
	bool plotMesh = false;

	// minimalistic user interface for terminal
	gsCmdLine cmd("This is the 2D linear elasticity benchmark: infinite plate with circular hole.");
	cmd.addInt("r", "refine", "Number of uniform refinement application", numUniRef);
	cmd.addInt("d", "degelev", "Number of degree elevation application", numDegElev);
	cmd.addInt("p", "points", "Number of points to plot to Paraview", numPlotPoints);
	cmd.addSwitch("m", "mesh", "Plot computational mesh", plotMesh);
	try { cmd.getValues(argc, argv); }
	catch (int rv) { return rv; }

	//=============================================//
		// Scanning geometry and creating bases //
	//=============================================//

	// scanning geometry
	gsMultiPatch<> geometry;
	gsReadFile<>(filename, geometry);

	// creating basis
	gsMultiBasis<> basis(geometry);
	for (index_t i = 0; i < numDegElev; ++i)
		basis.degreeElevate();
	for (index_t i = 0; i < numUniRef; ++i)
		basis.uniformRefine();
	gsInfo << basis;
	//=============================================//
		// Setting loads and boundary conditions //
	//=============================================//

	gsFunctionExpr<> analyticalStresses("1-1/(x^2+y^2)*(3/2*cos(2*atan2(y,x)) + cos(4*atan2(y,x))) + 3/2/(x^2+y^2)^2*cos(4*atan2(y,x))",
		"-1/(x^2+y^2)*(1/2*cos(2*atan2(y,x)) - cos(4*atan2(y,x))) - 3/2/(x^2+y^2)^2*cos(4*atan2(y,x))",
		"-1/(x^2+y^2)*(1/2*sin(2*atan2(y,x)) + sin(4*atan2(y,x))) + 3/2/(x^2+y^2)^2*sin(4*atan2(y,x))", 2);
	// boundary load neumann BC
	gsFunctionExpr<> traction("(-1+1/(x^2+y^2)*(3/2*cos(2*atan2(y,x)) + cos(4*atan2(y,x))) - 3/2/(x^2+y^2)^2*cos(4*atan2(y,x))) * (x==-4) +"
		"(-1/(x^2+y^2)*(1/2*sin(2*atan2(y,x)) + sin(4*atan2(y,x))) + 3/2/(x^2+y^2)^2*sin(4*atan2(y,x))) * (y==4)",
		"(1/(x^2+y^2)*(1/2*sin(2*atan2(y,x)) + sin(4*atan2(y,x))) - 3/2/(x^2+y^2)^2*sin(4*atan2(y,x))) * (x==-4) +"
		"(-1/(x^2+y^2)*(1/2*cos(2*atan2(y,x)) - cos(4*atan2(y,x))) - 3/2/(x^2+y^2)^2*cos(4*atan2(y,x))) * (y==4)", 2);
	// material parameters
	real_t youngsModulus = 1.0e3;
	real_t poissonsRatio = 0.3;

	// boundary conditions
	gsBoundaryConditions<> bcInfo;
	bcInfo.addCondition(0, boundary::north, condition_type::neumann, &traction);
	bcInfo.addCondition(0, boundary::west, condition_type::dirichlet, nullptr, 1); // last number is a component (coordinate) number
	bcInfo.addCondition(0, boundary::east, condition_type::dirichlet, nullptr, 0);

	// source function, rhs
	gsConstantFunction<> g(0., 0., 2);

	//=============================================//
			  // Assembling & solving //
	//=============================================//

	// creating assembler
	gsElasticityAssembler<real_t> assembler(geometry, basis, bcInfo, g);
	assembler.options().setReal("YoungsModulus", youngsModulus);
	assembler.options().setReal("PoissonsRatio", poissonsRatio);
	gsInfo << "Assembling...\n";
	gsStopwatch clock;
	clock.restart();
	assembler.assemble();
	gsInfo << "Assembled a system (matrix and load vector) with "
		<< assembler.numDofs() << " dofs in " << clock.stop() << "s.\n";

	gsInfo << "Solving...\n";
	clock.restart();

#ifdef GISMO_WITH_PARDISO
	gsSparseSolver<>::PardisoLLT solver(assembler.matrix());
	gsVector<> solVector = solver.solve(assembler.rhs());
	gsInfo << "Solved the system with PardisoLDLT solver in " << clock.stop() << "s.\n";
#else
	gsSparseSolver<>::SimplicialLDLT solver(assembler.matrix());
	gsVector<> solVector = solver.solve(assembler.rhs());
	gsInfo << "Solved the system with EigenLDLT solver in " << clock.stop() << "s.\n";
#endif

	//=============================================//
					  // Output //
	//=============================================//

	// constructing displacement as an IGA function
	gsMultiPatch<> solution;
	assembler.constructSolution(solVector, assembler.allFixedDofs(), solution);
	// constructing stress tensor
	gsPiecewiseFunction<> stresses;
	assembler.constructCauchyStresses(solution, stresses, stress_components::all_2D_vector);

	if (numPlotPoints > 0)
	{
		// constructing an IGA field (geometry + solution) for displacement
		gsField<> solutionField(assembler.patches(), solution);
		// constructing an IGA field (geometry + solution) for stresses
		gsField<> stressField(assembler.patches(), stresses, true);
		// analytical stresses
		gsField<> analyticalStressField(assembler.patches(), analyticalStresses, false);
		// creating a container to plot all fields to one Paraview file
		std::map<std::string, const gsField<> *> fields;
		fields["Deformation"] = &solutionField;
		fields["Stress"] = &stressField;
		fields["StressAnalytical"] = &analyticalStressField;
		gsWriteParaviewMultiPhysics(fields, "plateWithHole", numPlotPoints, plotMesh);
		gsInfo << "Open \"plateWithHole.pvd\" in Paraview for visualization. Stress wiggles on the left side are caused by "
			"a singularity in the parametrization.\n";
	}

	// eval stress at the top of the circular cut
	gsMatrix<> A(2, 1);
	A << 1., 0.; // parametric coordinates for the isogeometric solution
	gsMatrix<> res;
	stresses.piece(0).eval_into(A, res);
	A << 0., 1.; // spatial coordinates for the analytical solution
	gsMatrix<> analytical;
	analyticalStresses.eval_into(A, analytical);
	gsInfo << "XX-stress at the top of the circle: " << res.at(0) << " (computed), " << analytical.at(0) << " (analytical)\n";
	gsInfo << "YY-stress at the top of the circle: " << res.at(1) << " (computed), " << analytical.at(1) << " (analytical)\n";
	gsInfo << "XY-stress at the top of the circle: " << res.at(2) << " (computed), " << analytical.at(2) << " (analytical)\n";


	return 0;
}

总结 #pic_center

空格         空格

二维数
1
1
1

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/28145.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

AntDB 事务机制

全局一致性 AntDB 的集群架构包括&#xff0c;一个 GTM&#xff08;Global Transaction Manager&#xff09;、多个Coordinator&#xff08;CN&#xff09;、多个 Datanode&#xff08;DN&#xff09;。其中 GTM 负责给其他的 DN 和CN 分发集群全局唯一的事务号和集群当前判断…

你知道微信的转账是可以退回的吗

微信作为当今最受欢迎的即时通讯软件之一&#xff0c;其转账功能得到了广泛的应用。在使用微信转账时&#xff0c;我们可能会遇到一些问题&#xff0c;例如误操作、支付失败或者需要退款等等。 首先需要注意的是&#xff0c;微信转账退回的操作只能在“一天内未确认”时进行。如…

2023年天猫618淘宝大赢家每日1猜:哪系列是NB夏日潮流必备?今日答案是什么?淘宝天猫618红包口令怎么领取?

2023年6月13日天猫618淘宝大赢家今日答案 问题&#xff1a;哪系列是NB夏日潮流必备 答案&#xff1a;2002R &#xff08;注&#xff1a;R必须为大写&#xff09; 2023年淘宝天猫618超级红包怎么领取&#xff1f; 从2023年5月29日开始持续到6月20日&#xff0c;每天都可以打…

UniApp全局弹窗

一、设计思路 1、创建一个弹窗页面组件 2、配置page.json&#xff0c;使页面跳转是在当前界面展示 3、定义uni全局全局属性 4、解决多个弹窗同时使用的冲突问题 注意&#xff1a;此方案不支持多个弹窗并存&#xff0c;有且仅有一个会展示&#xff0c;当前弹窗展示并关闭上一个弹…

1740_使用Python+ImageMagick实现图像的批量压缩

全部学习汇总&#xff1a; GreyZhang/python_basic: My learning notes about python. (github.com) 前些年使用Linux的时候为了能够方便地往网络上上传照片&#xff0c;使用shell ImageMagick的组合进行照片的批量压缩一直觉得比较方便。不过&#xff0c;那时候即使这么简单的…

SQL注入总结

Sql注入定义&#xff1a; 就是通过把sql命令插入到web表单提交或输入域名或页面请求的查询字符串&#xff0c;最终达到欺骗服务器执行的sql命令的目的。 sql注入分类&#xff1a; 基于联合查询 基于错误回显 基于盲注&#xff0c;分时间盲注和布尔型的盲注 基于user-agen…

汽车仪表中控开发中视频相关的一些知识点

前言: 做汽车仪表/IVI中控,尤其是IVI信息娱乐部分,都要涉及到视频这个知识点,各种概念很多,首先需要明确一条主线,那就是SDTV标清电视->HDTV高清电视->UHDTV超高清电视的一个发展脉络,BT601/656是SDTV标清电视接口,BT1120则对应HDTV高清电视接口。ITU-R BT.601/6…

用Python将《青花瓷》的歌词生成词云图

前言 大家早好、午好、晚好吖 ❤ ~欢迎光临本文章 因为上次有小伙伴问我&#xff0c;歌曲的歌词和评论怎么生成词云图&#xff0c;想买代码… 当时我就拒绝了&#xff0c;直接免费送给了他。 所以今天来分享给大家 我们以周董的《青花瓷》为例&#xff0c;要对《青花瓷》歌词…

DDP分布式训练中遇到的一些问题

1&#xff1a;所有forward的输出必须参与到loss计算并回传 2&#xff1a;类似于layer_norm这样的操作是无需进行分布式通信的&#xff0c;也无法进行分布式通信&#xff0c;所以在DDP的时候必须把find_unused_parameters设置为True 3&#xff1a;当报错形式为如下时&#xff…

Linux基础知识3

Linux基础知识 适合有Linux基础的人群进行复习。 禁止转载&#xff01; 用户与用户组管理 Linux系统下的3类用户和功能&#xff1b; 答&#xff1a; root用户&#xff08;或称根用户、超级用户&#xff09;&#xff1a;Linux的内置用户&#xff0c;权限最高&#xff0c;具有…

Qt学习06:QPainter绘画

文章首发于我的个人博客&#xff1a;欢迎大佬们来逛逛 Qt学习06&#xff1a;QPainter绘画 Qt绘图 Paint System Qt的绘制系统支持在屏幕和打印设备上使用相同的API进行绘制&#xff0c;主要基于QPainter、QPaintDevice和QPaintEngine类。 QPainter用于执行绘图操作&#xff…

KYOCERA Programming Contest 2023(AtCoder Beginner Contest 305)(A、B、C、D)[施工中]

文章目录 A - Water Station(模拟)B - ABCDEFG&#xff08;模拟&#xff09;C - Snuke the Cookie Picker(模拟、暴力)D - Sleep Log&#xff08;二分&#xff0c;前缀&#xff09; A - Water Station(模拟) 题意&#xff1a;在[0,100]所有 x % 5 0的地方设置一个水站&#x…

有效延缓痴呆症:延世大学发现梯度提升机模型能准确预测 BPSD 亚综合征

内容一览&#xff1a;随着人口老龄化程度不断加剧&#xff0c;痴呆症已经成为公共健康问题。目前医学界治疗该病还只能通过药物缓解&#xff0c;尚未发现治愈的有效方法&#xff0c;因此&#xff0c;预防痴呆症尤为紧迫。在这一背景下&#xff0c;延世大学的研究人员开发了多个…

【每日挠头算法题(5)】重新格式化字符串|压缩字符串

欢迎~ 一、重新格式化字符串思路1&#xff1a;构造模拟具体代码如下&#xff1a; 思路2&#xff1a;双指针法具体代码如下&#xff1a; 二、字符串压缩思路1&#xff1a;简单替换 总结 一、重新格式化字符串 点我直达~ 思路1&#xff1a;构造模拟 1.遍历字符串&#xff0c;…

2023-6-12-第三式单例模式

&#x1f37f;*★,*:.☆(&#xffe3;▽&#xffe3;)/$:*.★* &#x1f37f; &#x1f4a5;&#x1f4a5;&#x1f4a5;欢迎来到&#x1f91e;汤姆&#x1f91e;的csdn博文&#x1f4a5;&#x1f4a5;&#x1f4a5; &#x1f49f;&#x1f49f;喜欢的朋友可以关注一下&#xf…

HTTPS

HTTP 协议内容都是按照文本的方式明文传输的。 这就导致在传输过程中出现一些被篡改的情况。为了保证安全&#xff0c;现在大多数网站都采用HTTPS协议。HTTPS协议是在HTTP协议的基础上引入了一个加密层SSL。 目录 HTTPS的加密流程对称加密非对称加密为什么引入非对称加密&…

Python处理办公自动化的10大场景

在编程世界里&#xff0c;Python已经是名副其实的网红了。Python最大优势在于容易学&#xff0c;门槛比Java、C低非常多&#xff0c;给非程序员群体提供了用代码干活的可能性。当然Python能成为大众编程工具&#xff0c;不紧是因为易学&#xff0c;还因为Python有成千上万的工具…

抖音电商发展路径:从外链种草到达人/品牌直播

复盘抖音电商发展&#xff0c;可以总结出以下几点发展特征&#xff1a; 策略重心的变化 以种草为核心&#xff0c;给电商引流站外成交&#xff08;2019 年及之前&#xff09;→ 力推达人直播但效 果一般&#xff08;2020 上半年&#xff09;→ 推品牌自播并彻底闭环&#xff0…

Redis.conf 详解

我们启动 Redis&#xff0c;一般都是通过 Redis.conf 启动。 因此&#xff0c;我们必须了解 Redis.conf 的配置&#xff0c;才能更好理解和使用 Redis。 单位 单位注意事项&#xff1a;当需要内存大小时&#xff0c;可以指定为1k 5GB 4M等 通常形式&#xff1a; 1k > 1000字…

谈谈几个常见数据结构的原理

数组 数组是最常用的数据结构&#xff0c;创建数组必须要内存中一块 连续 的空间&#xff0c;并且数组中必须存放 相同 的数据类型。比如我们创建一个长度为10&#xff0c;数据类型为整型的数组&#xff0c;在内存中的地址是从1000开始&#xff0c;那么它在内存中的存储格式如…