void DirichletEnthalpySurface<EvalT,Traits>::
evaluateFields(typename Traits::EvalData d)
{
    for (std::size_t cell = 0; cell < d.numCells; ++cell)
    {
      for (std::size_t node = 0; node < numNodes; ++node)
      {
        dirEnth(cell,node) = c_i * ( dirTemp(cell,node) - T0 );
        //std::cout << dirEnth(cell,node) << std::endl;
      }
    }
}
Beispiel #2
0
void FileNameTestCase::TestExists()
{
    wxFileName fn(wxFileName::CreateTempFileName("filenametest"));
    CPPUNIT_ASSERT( fn.IsOk() );
    wxON_BLOCK_EXIT1( wxRemoveFile, fn.GetFullPath() );

    CPPUNIT_ASSERT( fn.FileExists() );
    CPPUNIT_ASSERT( !wxFileName::DirExists(fn.GetFullPath()) );

    CPPUNIT_ASSERT( fn.Exists(wxFILE_EXISTS_REGULAR) );
    CPPUNIT_ASSERT( !fn.Exists(wxFILE_EXISTS_DIR) );
    CPPUNIT_ASSERT( fn.Exists() );

    const wxString& tempdir = wxFileName::GetTempDir();

    wxFileName fileInTempDir(tempdir, "bloordyblop");
    CPPUNIT_ASSERT( !fileInTempDir.Exists() );
    CPPUNIT_ASSERT( fileInTempDir.DirExists() );

    wxFileName dirTemp(wxFileName::DirName(tempdir));
    CPPUNIT_ASSERT( !dirTemp.FileExists() );
    CPPUNIT_ASSERT( dirTemp.DirExists() );

    CPPUNIT_ASSERT( dirTemp.Exists(wxFILE_EXISTS_DIR) );
    CPPUNIT_ASSERT( !dirTemp.Exists(wxFILE_EXISTS_REGULAR) );
    CPPUNIT_ASSERT( dirTemp.Exists() );

#ifdef __UNIX__
    CPPUNIT_ASSERT( !wxFileName::FileExists("/dev/null") );
    CPPUNIT_ASSERT( !wxFileName::DirExists("/dev/null") );
    CPPUNIT_ASSERT( wxFileName::Exists("/dev/null") );
    CPPUNIT_ASSERT( wxFileName::Exists("/dev/null", wxFILE_EXISTS_DEVICE) );
#ifdef __LINUX__
    // These files are only guaranteed to exist under Linux.
    // No need for wxFILE_EXISTS_NO_FOLLOW here; wxFILE_EXISTS_SYMLINK implies it
    CPPUNIT_ASSERT( wxFileName::Exists("/proc/self", wxFILE_EXISTS_SYMLINK) );
    CPPUNIT_ASSERT( wxFileName::Exists("/dev/log", wxFILE_EXISTS_SOCKET) );
#endif // __LINUX__
#ifndef __VMS
    wxString fifo = dirTemp.GetPath() + "/fifo";
   if (mkfifo(fifo.c_str(), 0600) == 0)
    {
        wxON_BLOCK_EXIT1(wxRemoveFile, fifo);

        CPPUNIT_ASSERT( wxFileName::Exists(fifo, wxFILE_EXISTS_FIFO) );
    }
#endif
#endif // __UNIX__
}