示例#1
0
    void Well::addCompletions(size_t time_step , const std::vector<CompletionConstPtr>& newCompletions) {
        CompletionSetConstPtr currentCompletionSet = m_completions->get(time_step);
        CompletionSetPtr newCompletionSet = CompletionSetPtr( currentCompletionSet->shallowCopy() );

        for (size_t ic = 0; ic < newCompletions.size(); ic++) 
            newCompletionSet->add( newCompletions[ic] );

        m_completions->add( time_step , newCompletionSet);
    }
示例#2
0
    void Well::addCompletions(size_t time_step , const std::vector<CompletionPtr>& newCompletions) {
        CompletionSetConstPtr currentCompletionSet = m_completions->get(time_step);
        CompletionSetPtr newCompletionSet = CompletionSetPtr( currentCompletionSet->shallowCopy() );

        for (size_t ic = 0; ic < newCompletions.size(); ic++) {
            newCompletions[ic]->fixDefaultIJ( m_headI , m_headJ );
            newCompletionSet->add( newCompletions[ic] );
        }

        addCompletionSet( time_step , newCompletionSet);
    }
示例#3
0
    void Compsegs::updateCompletionsWithSegment(const std::vector<CompsegsPtr>& compsegs,
                                                CompletionSetPtr completion_set) {

        for (size_t i_comp = 0; i_comp < compsegs.size(); ++i_comp) {
            const int i = compsegs[i_comp]->m_i;
            const int j = compsegs[i_comp]->m_j;
            const int k = compsegs[i_comp]->m_k;

            CompletionPtr new_completion = std::make_shared<Completion>(completion_set->getFromIJK(i, j, k));
            new_completion->attachSegment(compsegs[i_comp]->m_segment_number, compsegs[i_comp]->m_center_depth);
            completion_set->add(new_completion);
        }

        for (size_t ic = 0; ic < completion_set->size(); ++ic) {
            if ( !(completion_set->get(ic)->attachedToSegment()) ) {
                throw std::runtime_error(" not all the completions are attached with a segment,\n the information from COMPSEGS are not complete");
            }
        }
    }