Giter VIP home page Giter VIP logo

Comments (2)

fnrizzi avatar fnrizzi commented on July 19, 2024

can you please elaborate a bit more about what you mean by "boundary state and graph pointers"?
What is the purpose of doing this:

template <class T>
  void setBCPointer(::pressiodemoapps::impl::GhostRelativeLocation rloc, T* ptr) {
    m_bcFuncsHolder.setInternalPointer(rloc, ptr);
  }

I mean, what is ptr and what is it used for?

from pressio-demoapps.

cwentland0 avatar cwentland0 commented on July 19, 2024

The Schwarz Dirichlet boundary conditions requires access to a boundary state, and a graph referencing the boundary cell index to the appropriate ghost cell index within the boundary state. This is the same as in the original Schwarz implementation (on the schwarz branch), which used

const auto bcIndex = m_graphBcs(gRow, 0);
      if (bcIndex == -1) {
        m_ghostLeft(gRow, 0) = m_state(uIndex+0);
        m_ghostLeft(gRow, 1) = m_state(uIndex+1);
        m_ghostLeft(gRow, 2) = m_state(uIndex+2);
        m_ghostLeft(gRow, 3) = m_state(uIndex+3);
      }
      else {
        m_ghostLeft(gRow, 0) = m_stateBcs(bcIndex+0);
        m_ghostLeft(gRow, 1) = m_stateBcs(bcIndex+1);
        m_ghostLeft(gRow, 2) = m_stateBcs(bcIndex+2);
        m_ghostLeft(gRow, 3) = m_stateBcs(bcIndex+3);
      }

in conjunction with routines that set those pointers

void setStateBc(state_type * stateBc){
    m_stateBc = stateBc;
  }

  void setGraphBc(graph_type * ghostGraph){
    m_ghostGraph = ghostGraph;
  }

The function you quoted is just a catch-all for whatever similar pointers the user-defined BCFunctor might need to set after initializing the problem.

from pressio-demoapps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.