Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

USE dmd predict wrong result

Open
#313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
data

Research direction

Start with the CAROM::DMD calls to takeSample, train, projectInitialCondition, and predict, then inspect getParametricDMD with the IMQ and LS options. Reproduce the reported case using the supplied snapshot values and compare predictions at 600 and 18000 seconds; done means explaining or correcting the unexpected 116 and -333 results.

Written by the indexing model from the issue text.

Description

generator dmd 
for(auto fileName:fileNames)
    {

        std::vector<Eigen::MatrixXd> temp =utility.creatMedSingleSnapshot(ON_NODES,fileName,meshName,filedName,true);
        values.push_back(temp);

        int SizeData = temp.front().size();
        double dt = 600.;//600 second
        CAROM::DMD *dmd_u=new CAROM::DMD(SizeData,dt);

        for(int i = 0;i<temp.size();++i)
        {
            dmd_u->takeSample(values[index][i].data(),i*dt);
        }

        dmd_u->train(16);
        dmds.push_back(dmd_u);



        double flux = p[index].front();
        // double flux = 400.;
        std::shared_ptr< CAROM::Vector> param_vector(new CAROM::Vector(1, false));
        (*param_vector)(0) = flux;
        param_vectors.push_back(param_vector);



        index++;
    }

predict code

CAROM::DMD *dmd_u_p;
    CAROM::Vector desired_param(1, false);
    desired_param(0) = 70.;//load flux
    CAROM::getParametricDMD(dmd_u_p, param_vectors_ptr, dmds, &desired_param,
                            "IMQ", "LS", closest_rbf_val);

    std::unique_ptr<CAROM::Vector> init(new CAROM::Vector(5548,true));//FEM point size is 5548
    (*init)=20.;//init value
    dmd_u_p->projectInitialCondition(init.get());
    double predictTime = 18000.;
    auto value2 =dmd_u_p->predict(predictTime);

one point value in snapshot as follow: step time 6000

20
48.2409
60.205
65.475
67.8718
68.9871
69.5142
69.7658
69.8868
69.9451
69.9734
69.9871
69.9937
69.997
69.9985
69.9993
69.9996
69.9998
69.9999
70
70
70
70
70
70
70
70
70
70
70
70

when i predict 600s the value is 116 adn when i predict 18000s the value is -333. i don't konw why ?

Dominant language
C++
Stars
236
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from llnl/libROM

All issues in llnl/libROM

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.