本文整理汇总了C++中SolutionPtr::loadFromHDF5方法的典型用法代码示例。如果您正苦于以下问题:C++ SolutionPtr::loadFromHDF5方法的具体用法?C++ SolutionPtr::loadFromHDF5怎么用?C++ SolutionPtr::loadFromHDF5使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SolutionPtr
的用法示例。
在下文中一共展示了SolutionPtr::loadFromHDF5方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
MeshPtr mesh;
MeshPtr prevMesh;
SolutionPtr prevSoln;
mesh = MeshFactory::rectilinearMesh(bf, dimensions, elementCounts, H1Order, delta_k, origin);
if (rank==0) cout << "Initial mesh has " << mesh->getTopology()->activeCellCount() << " active (leaf) cells " << "and " << mesh->globalDofCount() << " degrees of freedom.\n";
FunctionPtr sideParity = Function::sideParity();
int lastFrameOutputted = -1;
SolutionPtr soln;
IPPtr ip;
ip = bf->graphNorm();
FunctionPtr u0 = Teuchos::rcp( new Cone_U0(0.0, 0.25, 0.1, 1.0, false) );
BCPtr bc = BC::bc();
bc->addDirichlet(qHat, inflowFilter, Function::zero()); // zero BCs enforced at the inflow boundary.
bc->addDirichlet(qHat, SpatialFilter::matchingZ(t0), u0);
MeshPtr initialMesh = mesh;
int startingSlabNumber;
if (previousSolutionTimeSlabNumber != -1)
{
startingSlabNumber = previousSolutionTimeSlabNumber + 1;
if (rank==0) cout << "Loading mesh from " << previousMeshFile << endl;
prevMesh = MeshFactory::loadFromHDF5(bf, previousMeshFile);
prevSoln = Solution::solution(mesh, bc, RHS::rhs(), ip); // include BC and IP objects for sake of condensed dof interpreter setup...
prevSoln->setUseCondensedSolve(useCondensedSolve);
if (rank==0) cout << "Loading solution from " << previousSolutionFile << endl;
prevSoln->loadFromHDF5(previousSolutionFile);
double tn = (previousSolutionTimeSlabNumber+1) * timeLengthPerSlab;
origin[2] = tn;
mesh = MeshFactory::rectilinearMesh(bf, dimensions, elementCounts, H1Order, delta_k, origin);
FunctionPtr q_prev = Function::solution(qHat, prevSoln);
FunctionPtr q_transfer = Teuchos::rcp( new MeshTransferFunction(-q_prev, prevMesh, mesh, tn) ); // negate because the normals go in opposite directions
bc = BC::bc();
bc->addDirichlet(qHat, inflowFilter, Function::zero()); // zero BCs enforced at the inflow boundary.
bc->addDirichlet(qHat, SpatialFilter::matchingZ(tn), q_transfer);
double t_slab_final = (previousSolutionTimeSlabNumber+1) * timeLengthPerSlab;
int frameOrdinal = 0;
while (frameTimes[frameOrdinal] < t_slab_final)
{
lastFrameOutputted = frameOrdinal++;
}
}
else
{
startingSlabNumber = 0;
}
#ifdef HAVE_EPETRAEXT_HDF5