Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5473017
Draft of populating mesh connectivity by reading in file.
rchen20 Dec 10, 2025
d97757a
New data file format.
rchen20 Dec 10, 2025
41885c1
Remove inclusion of data hpp.
rchen20 Dec 10, 2025
22c50e9
Use formulas for hyperplanes per angle, interior faces, boundary face…
rchen20 Dec 19, 2025
b2436a6
Reading mesh connectivity from the file.
rchen20 Dec 31, 2025
e71154a
Cleaner data format, and add problem size to the data file.
rchen20 Dec 31, 2025
60c9047
Typos, fixes, relative path to data file.
rchen20 Jan 5, 2026
500ace8
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 5, 2026
188107c
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 6, 2026
9b6d8d7
Add mesh input file option to commandline.
rchen20 Jan 14, 2026
85918d5
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 14, 2026
5ac46d5
Remove debug prints.
rchen20 Jan 16, 2026
6839b05
Require --femsweep-mesh-file to be specified in order to run the FEMS…
rchen20 Jan 16, 2026
59d5291
Fix variable scope for loops, and convert while into for.
rchen20 Jan 16, 2026
2e5a100
Remove string cast.
rchen20 Jan 16, 2026
7e145cb
Helper function to read arrays from mesh file.
rchen20 Jan 16, 2026
dd434ee
Use stol instead of stoi.
rchen20 Jan 16, 2026
e95c474
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 16, 2026
c88fc53
File name is a member of femsweep.
rchen20 Jan 16, 2026
0a3a53a
Use sharedinteriorfaces instead of constant.
rchen20 Jan 16, 2026
062fec8
Lambda helper for reading one mesh parameter.
rchen20 Jan 21, 2026
0d4c8bc
Remove old mesh.
rchen20 Jan 21, 2026
8e36b91
New mesh file.
rchen20 Jan 21, 2026
e5327ec
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 21, 2026
c6724e0
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 22, 2026
286f1a3
Trigger CI.
rchen20 Jan 22, 2026
0f203ef
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 23, 2026
d620d95
Merge branch 'develop' into task/chen59/femsweepmeshfile
rchen20 Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion src/apps/FEMSWEEP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

#include "FEMSWEEP.hpp"
#include "FEMSWEEP_DATA.hpp"

#include "RAJA/RAJA.hpp"

#include "common/DataUtils.hpp"

#include <fstream>
#include <string>
#include <algorithm>
#include <cmath>

Expand Down Expand Up @@ -98,6 +99,67 @@ void FEMSWEEP::setUp(VariantID vid, size_t RAJAPERF_UNUSED_ARG(tune_idx))
allocAndInitDataRandValue (m_M0dat , m_M0len , vid);
allocAndInitDataRandValue (m_Xdat , m_Xlen , vid);

// Read mesh connectivity data from file.
std::ifstream dataFile("FEMSWEEP_DATA.txt");

if ( !dataFile.is_open() )
{
std::cout << "Could not open FEMSWEEP_DATA.txt" << std::endl;
return 1;
}

int lcount = 1;
std::string line;
while ( std::getLine(dataFile, line) )
{
if ( lcount >= 11 && lcount <= 82 )
{
g_nhpaa_r[lcount-11] = std::stoi(line);
}

else if ( lcount >= 86 && lcount <= 157 )
{
g_ohpaa_r[lcount-86] = std::stoi(line);
}

else if ( lcount >= 161 && lcount <= 3256 )
{
g_phpaa_r[lcount-161] = std::stoi(line);
}

else if ( lcount >= 3261 && lcount <= 246260 )
{
g_order_r[lcount-3261] = std::stoi(line);
}

else if ( lcount >= 246265 && lcount <= 1704264 )
{
g_AngleElem2FaceType[lcount-246265] = std::stoi(line);
}

else if ( lcount >= 1704268 && lcount <= 1724517 )
{
g_elem_to_faces[lcount-1704268] = std::stoi(line);
}

else if ( lcount >= 1724521 && lcount <= 1735320 )
{
g_F_g2l[lcount-1724521] = std::stoi(line);
}

else if ( lcount >= 1735324 && lcount <= 1773123 )
{
g_idx1[lcount-1735324] = std::stoi(line);
}

else if ( lcount >= 1773127 && lcount <= 1810926 )
{
g_idx2[lcount-1773127] = std::stoi(line);
}

lcount++;
}

// Some of the constants are properties of the mesh.
// Will need to derive these when mesh generator is available.
allocAndCopyHostData(m_nhpaa_r, g_nhpaa_r, m_na , vid);
Expand Down
20 changes: 10 additions & 10 deletions src/apps/FEMSWEEP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,16 @@ class FEMSWEEP : public KernelBase
Index_type m_idx2len;

// Mesh data
static Index_type g_nhpaa_r[72];
static Index_type g_ohpaa_r[72];
static Index_type g_phpaa_r[3096];
static Index_type g_order_r[243000];

static Index_type g_AngleElem2FaceType[1458000];
static Index_type g_elem_to_faces[20250] ;
static Index_type g_F_g2l[10800] ;
static Index_type g_idx1[37800] ;
static Index_type g_idx2[37800] ;
Index_type g_nhpaa_r[72];
Index_type g_ohpaa_r[72];
Index_type g_phpaa_r[3096];
Index_type g_order_r[243000];

Index_type g_AngleElem2FaceType[1458000];
Index_type g_elem_to_faces[20250] ;
Index_type g_F_g2l[10800] ;
Index_type g_idx1[37800] ;
Index_type g_idx2[37800] ;
};

} // end namespace apps
Expand Down
48 changes: 0 additions & 48 deletions src/apps/FEMSWEEP_DATA.hpp

This file was deleted.

Loading
Loading