Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set mesh info and read MPAS Mesh #7

Merged
merged 32 commits into from
Jul 20, 2023
Merged

Conversation

RPIFisherman
Copy link
Contributor

@RPIFisherman RPIFisherman commented Jul 18, 2023

  • add set mesh info APIs:

    polyMPO/src/pmo_c.h

    Lines 29 to 36 in 1e78b56

    //Mesh info
    void polympo_checkMeshSetting(MPMesh_ptr p_mpmesh, int maxEdges, int vertexDegree);
    void polympo_setMeshNumVtxs(MPMesh_ptr p_mpmesh, int numVtxs);
    void polympo_setMeshNumElms(MPMesh_ptr p_mpmesh, int numElms);
    void polympo_setMeshVtxCoords(MPMesh_ptr p_mpmesh, int size, double* xArray, double* yArray, double* zArray);
    void polympo_setMeshNumEdgesPerElm(MPMesh_ptr p_mpmesh, int size, int* array);
    void polympo_setMeshElm2VtxConn(MPMesh_ptr p_mpmesh, int size1, int size2, int* array);
    void polympo_setMeshElm2ElmConn(MPMesh_ptr p_mpmesh, int size1, int size2, int* array);
  • add testMeshOption and testMPOption for creating test mesh and MPMesh:

    polyMPO/src/pmo_c.cpp

    Lines 22 to 39 in 1e78b56

    MPMesh_ptr polympo_createMPMesh(int testMeshOption, int testMPOption) {
    polyMpmTest::Mesh* p_mesh;
    if(testMeshOption){
    int scaleFactor = 1;
    p_mesh = polyMpmTest::initTestMesh(testMeshOption, scaleFactor);
    }else{
    p_mesh = new polyMpmTest::Mesh();
    }
    polyMpmTest::MaterialPoints* p_mps;
    if(testMPOption){
    p_mps = polyMpmTest::initTestMPs(p_mesh, testMPOption);
    }else{
    p_mps = new polyMpmTest::MaterialPoints();
    }
    MPMesh_ptr p_mpMeshReturn = (MPMesh_ptr) new polyMpmTest::MPMesh(p_mesh, p_mps);
    p_mpmeshes.push_back(p_mpMeshReturn);
    return p_mpMeshReturn;
    }
  • do some clean up

@RPIFisherman RPIFisherman added the enhancement New feature or request label Jul 18, 2023
@RPIFisherman RPIFisherman requested a review from cwsmith July 18, 2023 19:44
@RPIFisherman RPIFisherman self-assigned this Jul 18, 2023
Copy link
Contributor

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left some comments, suggestions, and questions.

CMakeLists.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/pmo_c.cpp Outdated Show resolved Hide resolved
src/pmo_c.cpp Outdated Show resolved Hide resolved
src/pmo_c.cpp Outdated Show resolved Hide resolved
src/pmt_MPMesh.hpp Outdated Show resolved Hide resolved
test/testFortran.f90 Outdated Show resolved Hide resolved
test/testFortranReadMPAS.f90 Outdated Show resolved Hide resolved
test/testFortranReadMPAS.f90 Show resolved Hide resolved
test/testTracking.cpp Outdated Show resolved Hide resolved
@RPIFisherman
Copy link
Contributor Author

@cwsmith If the changes look good to you, please approve the request, so that I can merge it.

@RPIFisherman RPIFisherman merged commit f9e3297 into cws/pumipicDps Jul 20, 2023
@RPIFisherman RPIFisherman deleted the yg/fortranMPASMesh branch July 20, 2023 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants