OverlapMetaIteratorGet(std::vector<std::string> const & rV)
				: V(rV), IV(V.size()), I(V.size()), t(0), maxaread(-1)
				{
					for ( uint64_t i = 0; i < V.size(); ++i )
					{
						IV[i] = libmaus2::dazzler::align::OverlapIndexer::getIndexName(V[i]);
						index_type::unique_ptr_type Tptr(new index_type(IV[i]));
						I[i] = UNIQUE_PTR_MOVE(Tptr);
						t += I[i]->size();
						maxaread = std::max(maxaread,libmaus2::dazzler::align::OverlapIndexer::getMaximumARead(V[i]));
					}
				}
Beispiel #2
0
				static indexer_type::unique_ptr_type creatIndexer(std::iostream * IOSI)
				{
					indexer_type::unique_ptr_type Pptr;
					
					if ( IOSI )
					{
						indexer_type::unique_ptr_type Tptr(new indexer_type(*IOSI));
						Pptr = UNIQUE_PTR_MOVE(Tptr);
					}				
					
					return UNIQUE_PTR_MOVE(Pptr);
				}
Beispiel #3
0
				static libmaus2::aio::InputOutputStream::unique_ptr_type openIndexStream(std::string const & ifn, bool const createindex)
				{
					libmaus2::aio::InputOutputStream::unique_ptr_type Pptr;
					
					if ( createindex )
					{
						libmaus2::aio::InputOutputStream::unique_ptr_type Tptr(libmaus2::aio::InputOutputStreamFactoryContainer::constructUnique(ifn,std::ios::in|std::ios::out|std::ios::trunc|std::ios::binary));
						Pptr = UNIQUE_PTR_MOVE(Tptr);
					}
					
					return UNIQUE_PTR_MOVE(Pptr);
				}
init_ws()
{
#ifndef GEM
	extern alice_window main_win;
	curr_window = &main_win;
#endif

	curr_workspace = ws_list = Tptr(main_ws);
#ifndef GEM
	main_win.wspace = curr_workspace;
#endif

	linkup( curr_workspace, 0, make_stub( C_ROOT ) );
	work_name(curr_workspace) = "main";
	work_debug( curr_workspace ) = 0;
#ifdef GEM
	do_gdupdate();
#endif
	
	printt1( "Initialize workspaces - main_ws is %x\n", Tptr(main_ws) );
	/* an init_pwork will be done later if we decide to clip */
}
Beispiel #5
0
			FastABgzfDecoder::unique_ptr_type getStream(std::string const & filename, uint64_t const id) const
			{
				FastABgzfDecoder::unique_ptr_type Tptr(new FastABgzfDecoder(filename,(*this)[id],blocksize));
				return UNIQUE_PTR_MOVE(Tptr);
			}
Beispiel #6
0
			FastABgzfDecoder::unique_ptr_type getStream(std::istream & in, uint64_t const id) const
			{
				FastABgzfDecoder::unique_ptr_type Tptr(new FastABgzfDecoder(in,(*this)[id],blocksize));
				return UNIQUE_PTR_MOVE(Tptr);
			}
int main(int argc, char *argv[])
{
    #include "postProcess.H"

    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"
    #include "createControls.H"
    #include "createFields.H"

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    Info<< "\nCalculating displacement field\n" << endl;

    while (runTime.loop())
    {
        Info<< "Iteration: " << runTime.value() << nl << endl;

        #include "readSolidDisplacementFoamControls.H"

        int iCorr = 0;
        scalar initialResidual = 0;

        do
        {
            if (thermalStress)
            {
                volScalarField& T = Tptr();
                solve
                (
                    fvm::ddt(T) == fvm::laplacian(DT, T)
                );
            }

            {
                fvVectorMatrix DEqn
                (
                    fvm::d2dt2(D)
                 ==
                    fvm::laplacian(2*mu + lambda, D, "laplacian(DD,D)")
                  + divSigmaExp
                );

                if (thermalStress)
                {
                    const volScalarField& T = Tptr();
                    DEqn += fvc::grad(threeKalpha*T);
                }

                //DEqn.setComponentReference(1, 0, vector::X, 0);
                //DEqn.setComponentReference(1, 0, vector::Z, 0);

                initialResidual = DEqn.solve().max().initialResidual();

                if (!compactNormalStress)
                {
                    divSigmaExp = fvc::div(DEqn.flux());
                }
            }

            {
                volTensorField gradD(fvc::grad(D));
                sigmaD = mu*twoSymm(gradD) + (lambda*I)*tr(gradD);

                if (compactNormalStress)
                {
                    divSigmaExp = fvc::div
                    (
                        sigmaD - (2*mu + lambda)*gradD,
                        "div(sigmaD)"
                    );
                }
                else
                {
                    divSigmaExp += fvc::div(sigmaD);
                }
            }

        } while (initialResidual > convergenceTolerance && ++iCorr < nCorr);

        #include "calculateStress.H"

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

    Info<< "End\n" << endl;

    return 0;
}