Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
474cce0
Update apfElement.cc
jacobmerson Jul 28, 2024
5723b35
Merge pull request #443 from SCOREC/fix-get-element-node-data
cwsmith Aug 7, 2024
5fe40ea
spr: add thesis section to ref
cwsmith Aug 8, 2024
3e9f07b
silence warning
cwsmith Aug 24, 2024
4aa2326
cgns: support spack install
cwsmith Aug 24, 2024
9f91f21
replace VLAs
cwsmith Aug 24, 2024
279c82c
clean under asan sanitizer with gcc 12.3.0
cwsmith Aug 24, 2024
0e5dd36
add sim+cgns build
cwsmith Aug 25, 2024
3d3a6ef
formatting
cwsmith Aug 25, 2024
6e9ee8d
move nightly test+merge to rhel9
cwsmith Aug 25, 2024
399ac8f
user name change
cwsmith Aug 25, 2024
07122b1
add approved self-hosted user
cwsmith Aug 28, 2024
8f0ba68
missed a paren
cwsmith Aug 28, 2024
b07cc4e
need module command
cwsmith Aug 28, 2024
f038fcf
missed the other env
cwsmith Aug 28, 2024
2c3f073
append to log file
cwsmith Aug 28, 2024
1106f01
Implement capstone gmi functions
bobpaw Aug 29, 2024
c5ab193
heredoc for multiline message
cwsmith Aug 30, 2024
f079f68
complete user cmake example
cwsmith Sep 6, 2024
dc3ff3c
install and build user project
cwsmith Sep 6, 2024
3cb981e
set install path
cwsmith Sep 6, 2024
19e9453
fix typo
cwsmith Sep 6, 2024
10de843
fix ci conditional
cwsmith Sep 6, 2024
60c94ce
compiler comparison attempt
cwsmith Sep 7, 2024
f3e9bd3
update checkout actions
cwsmith Sep 7, 2024
88a39f6
name is a field of the compiler entry
cwsmith Sep 7, 2024
a1f08e5
Set bob install dir to CMAKE_LIBDIR
bobpaw Aug 29, 2024
7cc2e23
Replace other lib with LIBDIR and bin with BINDIR
bobpaw Sep 6, 2024
7df25b3
Replace include with CMAKE_INSTALL_INCLUDEDIR
bobpaw Sep 6, 2024
2d470f9
Merge pull request #451 from SCOREC/apw/bob_libdir
cwsmith Sep 8, 2024
02c41e5
Fix logic checking periodic model faces
joshia5 Aug 9, 2024
2e031e0
spell check
joshia5 Aug 9, 2024
7cd7647
Merge pull request #446 from SCOREC/joshia5-periodic-gface
cwsmith Sep 9, 2024
289b634
Remove FIXME and replace with comment
bobpaw Sep 10, 2024
367396e
Add apf::smoothCAPAnisoSizes
bobpaw Sep 20, 2024
594fd52
Add apf::smoothCAPAnisoSizes compile flags
bobpaw Sep 20, 2024
91bbfe9
Add feature test for sizing metric tool
bobpaw Sep 22, 2024
ecc2e72
Add apf::smoothCAPAnisoSizes compilation test
bobpaw Sep 22, 2024
3e6ecac
Merge pull request #455 from SCOREC/apw/cap_smooth
cwsmith Sep 23, 2024
5abc2b9
Add gmi_cap isInClosureOf test
bobpaw Sep 23, 2024
ed78339
fix: Move function call outside of debug assert
bobpaw Sep 25, 2024
e8c9770
Merge pull request #457 from SCOREC/apw/fix_cap_smooth_eigen
cwsmith Sep 26, 2024
32c22af
Add test/cap_closestPoint
bobpaw Oct 3, 2024
4fdda7b
Merge branch 'develop' into apw/gmi_cap_improvements
bobpaw Oct 3, 2024
4a3fe52
Fix smoothCAPAnisoSizes eigenvalues and transpose
bobpaw Oct 7, 2024
1555069
Clarify that orthogonal basis frames are columns (#459)
bobpaw Oct 8, 2024
8db614c
fix: Correct smoothCAPAnisoSizes param order
bobpaw Oct 10, 2024
27a3806
increase versions for simmodsuite 2025.0.241016
cwsmith Oct 21, 2024
1276d76
Merge pull request #452 from SCOREC/apw/gmi_cap_improvements
cwsmith Oct 21, 2024
826c79d
Merge pull request #458 from SCOREC/apw/fix_capSmooth_eigen
cwsmith Oct 21, 2024
f4f31a9
Merge pull request #460 from SCOREC/apw/smoothCAPAnisoSizes_paramorder
cwsmith Oct 21, 2024
5cbef61
Merge pull request #461 from SCOREC/cws/sim2025
cwsmith Oct 21, 2024
3f33c98
simplify and improve logic for setting C++ standard
cwsmith Oct 21, 2024
16aa111
bob_set_cxx_standard should only be called once
cwsmith Oct 22, 2024
e39d19b
Merge pull request #462 from SCOREC/cws/cxx14cmake
cwsmith Oct 22, 2024
54a6351
copy inputs needed for smoke tests to repo
cwsmith Oct 25, 2024
d423332
Merge pull request #463 from SCOREC/cws/smokeMeshes
cwsmith Oct 25, 2024
befbc7d
Moved capStone2VTK to test/cap2vtk
bobpaw Aug 29, 2024
8346e81
Remove exe sources which are not in CMake
bobpaw Aug 31, 2024
4569131
Move some capstone_clis to test
bobpaw Sep 5, 2024
5211c75
Remove capStoneAnisoAdaptWing
bobpaw Sep 5, 2024
b9eada0
Move capStoneSizeFields to test
bobpaw Sep 6, 2024
d3606ce
Remove capStoneAttachSolution.cc
bobpaw Oct 30, 2024
7c9ffe5
Merge pull request #464 from bobpaw/apw/remove_capstone_clis
cwsmith Oct 30, 2024
43afdd0
generate: fix mem leaks of simmodsuite objects
cwsmith Nov 1, 2024
f87525c
pumi version 2.2.9
cwsmith Nov 2, 2024
2234096
Fix unused variable warning introduced by #446 (#453)
bobpaw Nov 4, 2024
0191626
test globus (#466) - refactor globus compute scripts
Angelyr Nov 11, 2024
69fd349
Merge branch 'develop' into pcu-object-breaking
cwsmith Dec 3, 2024
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
1 change: 1 addition & 0 deletions doc/mylibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <apfBox.h>
#include <apfMesh2.h>
#include <apf.h>

void makeMesh(pcu::PCU *PCUObj) {
gmi_register_mesh();
apf::Mesh2* m = apf::makeMdsBox(1,1,1,1,1,1,0,PCUObj);
Expand Down
155 changes: 155 additions & 0 deletions test/capCheckParam.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
#include <PCU.h>
#include <queue>
#include <apf.h>
#include <pcu_util.h>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <vector>


#include "CapstoneModule.h"
#include "CreateMG_Framework_Core.h"
#include "CreateMG_Framework_Analysis.h"
#include "CreateMG_Framework_Application.h"
#include "CreateMG_Framework_Attributes.h"
#include "CreateMG_Framework_Core.h"
#include "CreateMG_Framework_Geometry.h"
#include "CreateMG_Framework_Mesh.h"

using namespace CreateMG;
using namespace CreateMG::Attribution;
using namespace CreateMG::Mesh;
using namespace CreateMG::Geometry;

void checkParametrization(MeshDatabaseInterface* mdb, GeometryDatabaseInterface* gdb);

int main(int argc, char** argv)
{
MPI_Init(&argc, &argv);
PCU_Comm_Init();

if (argc != 2) {
if(0==PCU_Comm_Self())
std::cerr << "usage: " << argv[0]
<< " <cre file .cre>\n";
return EXIT_FAILURE;
}

const char* creFileName = argv[1];

// load capstone mesh
// create an instance of the Capstone Module activating CREATE/CREATE/CREATE
// for the Geometry/Mesh/Attribution databases
/* const std::string gdbName("Geometry Database : Create");// Switch Create with SMLIB for CAD */
const std::string gdbName("Geometry Database : SMLIB");// Switch Create with SMLIB for CAD
const std::string mdbName("Mesh Database : Create");
const std::string adbName("Attribution Database : Create");

CapstoneModule cs("the_module", gdbName.c_str(), mdbName.c_str(), adbName.c_str());

GeometryDatabaseInterface *g = cs.get_geometry();
MeshDatabaseInterface *m = cs.get_mesh();
AppContext *c = cs.get_context();


PCU_ALWAYS_ASSERT(g);
PCU_ALWAYS_ASSERT(m);
PCU_ALWAYS_ASSERT(c);

v_string filenames;
filenames.push_back(creFileName);

M_GModel gmodel = cs.load_files(filenames);

int numbreps = 0;
MG_CALL(g->get_num_breps(numbreps));
std::cout << "number of b reps is " << numbreps << std::endl;
if(numbreps == 0)
error(HERE, ERR_INVALID_INPUT, "Model is empty");

M_MModel mmodel;
// Pick the volume mesh model from associated mesh models to this geom model
std::vector<M_MModel> mmodels;
MG_API_CALL(m, get_associated_mesh_models(gmodel, mmodels));
for(std::size_t i = 0; i < mmodels.size(); ++i)
{
M_MModel ammodel = mmodels[i];
std::size_t numregs = 0;
std::size_t numfaces = 0;
std::size_t numedges = 0;
std::size_t numverts = 0;
MG_API_CALL(m, set_current_model(ammodel));
MG_API_CALL(m, get_num_topos(TOPO_REGION, numregs));
MG_API_CALL(m, get_num_topos(TOPO_FACE, numfaces));
MG_API_CALL(m, get_num_topos(TOPO_EDGE, numedges));
MG_API_CALL(m, get_num_topos(TOPO_VERTEX, numverts));
std::cout << "num regions is " << numregs << std::endl;
std::cout << "num faces is " << numfaces << std::endl;
std::cout << "num edges is " << numedges << std::endl;
std::cout << "num verts is " << numverts << std::endl;
std::cout << "-----------" << std::endl;
if(numregs > 0)
{
mmodel = ammodel;
break;
}
}

/* SET THE ADJACENCIES */
MG_API_CALL(m, set_adjacency_state(REGION2FACE|
REGION2EDGE|
REGION2VERTEX|
FACE2EDGE|
FACE2VERTEX));
MG_API_CALL(m, set_reverse_states());
MG_API_CALL(m, set_adjacency_scope(TOPO_EDGE, SCOPE_FULL));
MG_API_CALL(m, set_adjacency_scope(TOPO_FACE, SCOPE_FULL));
MG_API_CALL(m, compute_adjacency());


// check parametrization using capstone apis
checkParametrization(m, g);

PCU_Comm_Free();
MPI_Finalize();
}

void checkParametrization(MeshDatabaseInterface* mdb, GeometryDatabaseInterface* gdb)
{
MeshSmartIterator miter(mdb);
mdb->get_topo_iterator(TOPO_VERTEX, miter);
int count = 0;
double sum = 0.0;
for(mdb->iterator_begin(miter); !mdb->iterator_end(miter); mdb->iterator_next(miter)) {
M_MTopo vert = mdb->iterator_value(miter);
M_GTopo geom;
GeometryTopoType gtype;
mdb->get_geom_entity(vert, gtype, geom);
if (!gdb->is_face(geom)) continue;
double range_u[2];
double range_v[2];
gdb->get_parametrization_range(geom, 0, range_u[0], range_u[1]);
gdb->get_parametrization_range(geom, 1, range_v[0], range_v[1]);
GeometryTopoType gtype1;
double u,v;
mdb->get_vertex_uv_parameters(vert, u, v, gtype1);
PCU_ALWAYS_ASSERT(gtype1 == gtype);

// coordinate from mesh
apf::Vector3 coord;
mdb->get_vertex_coord(vert, &(coord[0]));

// coordinate from surface
vec3d x;
gdb->get_point(geom, vec3d(u, v, 0.0), x);
apf::Vector3 pcoord(x[0], x[1], x[2]);

if (count < 50)
printf("%d, %e, %e, %e, %e, %e, %e, %e\n", count, u, v, range_u[0], range_u[1], range_v[0], range_v[1], (coord-pcoord).getLength());
sum += (coord-pcoord) * (coord-pcoord);
count++;
}
printf("norm of the difference vector is %e\n", std::sqrt(sum));
}
2 changes: 1 addition & 1 deletion test/convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <getopt.h>
#include <string.h>
#include <stdio.h>
#include <array>
#include <array> //std::array

using namespace std;

Expand Down