Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • liangb30/cas-741-boliang
  • pignierb/cas741
  • jimoha1/cas741
  • huoy8/cas741
  • grandhia/cas741
  • chenq84/cas741
  • yex33/cas741
  • xuey45/cas741
  • garcilau/cas-741-uriel-garcilazo-msa
  • schankuc2/cas741
  • ahmady3/cas741
  • saadh/cas741
  • singhk56/cas741
  • lin523/cas741
  • fangz58/cas741
  • tranp30/cas741
  • ceranich/cas741
  • norouf1/cas741
  • mirzam48/cas741
  • djavahet/cas741
  • hossaa27/cas741
  • yiding_el/cas-741-upate-name
  • sayadia/cas741
  • elmasn2/cas741
  • cheemf8/cas741
  • cheny997/cas741
  • ma209/cas741
  • mousas26/cas741
  • liuy363/cas741
  • wongk124/cas741
  • dua11/cas741
  • zhoug28/cas741
  • courses/cas-741-tst
  • liy443/cas-741-fork-csv
  • sochania/cas741
  • liy443/cas-741-update-csv-old
  • mahdipoa/cas741
  • wangz892/cas741
  • wangn14/cas741
  • defourej/cas741
  • zhaox183/cas741
  • smiths/cas741
42 results
Show changes
Showing
with 545 additions and 0 deletions
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the test case TC5. */
/* This test case is design for test correctness of PMGT. */
/*****************************************************************************/
#include <iostream>
#ifndef SERVICE
#include "Service.h"
#endif
#ifndef COARSENING
#include "Coarsening.h"
#endif
#ifndef REFINING
#include "Refining.h"
#endif
#ifndef OUTPUT
#include "Output.h"
#endif
#ifndef INPUT
#include "Input.h"
#endif
#ifndef MESH
#include "Mesh.h"
#endif
using namespace PMGT;
int main(){
Mesh mesh;
Input input;
Refining ref;
Output output;
input.read_file(mesh, "oldVertices.dat", "oldCells.dat");
double x = 0.4;
int count = 0;
char vfile[32];
char* vp = vfile;
char cfile[32];
char* cp = cfile;
char number[8];
while(1){
// refine
count++;
sprintf(number, "%i", count);
vp = strcpy(vp, "newVertices");
vp = strcat(vp, number);
vp = strcat(vp,".dat");
cp = strcpy(cp, "newCells");
cp = strcat(cp, number);
cp = strcat(cp,".dat");
int n = mesh.n_of_c();
vector<int> vIds;
Point zero;
Vertex vtx[3];
zero.clear();
zero.push_back(0);
zero.push_back(0);
for (int i=0; i<n; i++){
vIds.clear();
vIds = mesh.vIds_from_cId(i);
for (int j=0; j<3; j++){
vtx[j] = mesh.vertex(vIds[j]);
}
double first = vtx[0].distance(zero)-0.7;
double second = vtx[1].distance(zero)-0.7;
if (first*second<DBL_EPSILON){
mesh.cell(i).setMflag(REFINE);
}
else{
double third = vtx[2].distance(zero)-0.7;
if (first*third < DBL_EPSILON){
mesh.cell(i).setMflag(REFINE);
}
}
}
ref.longest_edge(mesh);
output.write_file(mesh,vp, cp);
if (count==15){
break;
}
}
cout << "There are " << count << " meshes generated." << endl;
return 0;
}
This is the serial version of PMGT.
There is only one test case (TC5).
To compile this test file, just type "make"
To remove generated object files and the executable file, type "make cleanAll"
To remove generated output files, type "make cleanOutput"
\ No newline at end of file
OBJECTS = ../mgt/Service.o ../mgt/Coarsening.o ../mgt/Refining.o ../mgt/Output.o ../mgt/Input.o ../mgt/Mesh.o
TEST_OBJ = 5_test_sr_arc.o
TEST_SRC = 5_test_sr_arc.cpp
ALL_TEST = 5_test_sr_arc
# all testing executable
all: $(TEST_OBJ)
@cd ../mgt; $(MAKE) $@
g++ -o 5_test_sr_arc $(OBJECTS) 5_test_sr_arc.o
$(TEST_OBJ): $(TEST_SRC)
g++ -c $(TEST_SRC) -I../mgt
# remove generated testing and PMGT files
clean:
@cd ../mgt; $(MAKE) $@
rm -f *.o $(ALL_TEST)
# remove generated testing files.
# keep the PMGT files
cleanTest:
rm -f $(TEST_OBJ) $(ALL_TEST)
# remove generated output files
cleanOutput:
rm newVertices* newCells*
OBJECTS = Service.o Coarsening.o Refining.o Output.o Input.o Mesh.o
TEST_OBJ = 5_test_sr_arc.o
SOURCES = Service.cpp Coarsening.cpp Refining.cpp Output.cpp Input.cpp Mesh.cpp
TEST_SRC = 5_test_sr_arc.cpp
HEADERS = Service.h Coarsening.h Refining.h Input.h Input.h Mesh.h Cell.h Edge.h Vertex.h
ALL_TEST = 5_test_sr_arc
# all testing executable
all: $(TEST_OBJ)
@cd ../mgt; $(MAKE) $@
g++ -o 5_test_sr_arc $(OBJECTS) 5_test_sr_arc.o -L../mgt
5_test_sr_arc:5_test_sr_arc.o
g++ -o 5_test_sr_arc $(OBJECTS) 5_test_sr_arc.o
$(TEST_OBJ): $(TEST_SRC)
g++ -c $(TEST_SRC)
# remove generated testing and PMGT files
clean:
@cd src; $(MAKE) $@
rm *.o $(ALL_TEST)
# remove generated testing files.
# keep the PMGT files
cleanTest:
rm $(TEST_OBJ) $(ALL_TEST)
# remove generated output files
cleanOutput:
rm newVertices* newCells*
\ No newline at end of file
0 1 3
0 3 2
0.0 0.0
1.0 0.0
0.0 1.0
1.0 1.0
function show_serial(n)
% plot original mesh
load oldVertices.dat; load oldCells.dat;
oldCells(:,:) = oldCells(:,:)+1;
triplot(oldCells, oldVertices(:,1), oldVertices(:,2))
title('Original Mesh')
axis equal
% plot new mesh
for (i=1:n)
vfile = strcat('newVertices',num2str(i),'.dat');
vfid = fopen(vfile, 'r');
v = fscanf(vfid,'%f %f');
fclose(vfid);
[nv,nnv] = size(v);
vv = zeros(nv/2, 2);
[mv,mmv] = size(vv);
for(j=1:mv)
vv(j,1) = v((j-1)*2+1);
vv(j,2) = v((j-1)*2+2);
end
cfile = strcat('newCells',num2str(i),'.dat');
cfid = fopen(cfile, 'r');
c = fscanf(cfid,'%g %g %g');
fclose(cfid);
[nc,nnc] = size(c);
cc = zeros(nc/3, 3);
[mc,mmc] = size(cc);
for(j=1:mc)
cc(j,1) = c((j-1)*3+1);
cc(j,2) = c((j-1)*3+2);
cc(j,3) = c((j-1)*3+3);
end
cc(:,:) = cc(:,:)+1;
% plot
figure
triplot(cc, vv(:,1), vv(:,2))
t = strcat('Mesh for "', vfile,'" and "', cfile,'"');
title(t)
axis equal
end
% cells2(:,:) = cells2(:,:)+1;
% cells3(:,:) = cells3(:,:)+1;
%
% % plot
% triplot(cells1, vertices1(:,1), vertices1(:,2))
% title('Test Creation')
% axis equal
%
% figure
% triplot(cells2, vertices2(:,1), vertices2(:,2))
% title('Test Refinement')
% axis equal
%
% figure
% triplot(cells3, vertices3(:,1), vertices3(:,2))
% title('Test Coarsening')
% axis equal
\ No newline at end of file
// testing code
#include <iostream>
#ifndef MESH
#include "Mesh.h"
#endif
#ifndef INPUT
#include "Input.h"
#endif
#ifndef OUTPUT
#include "Output.h"
#endif
#ifndef REFINING
#include "Refining.h"
#endif
#ifndef COARSENING
#include "Coarsening.h"
#endif
#ifndef SERVICE
#include "Service.h"
#endif
//using namespace PMGT::Vertex;
//using namespace PMGT::Edge;
//using namespace PMGT::Cell;
//using namespace PMGT::Mesh;
using namespace PMGT;
int main(){
char* vertexFile = "oldVertices.dat";
char* cellFile = "oldCells.dat";
int i,nc;
Mesh mesh;
Input input;
Output output;
Refining ref;
Coarsening cos;
Service sev;
input.read_file(mesh, vertexFile, cellFile);
if (sev.is_valid_mesh(mesh)){
cout << "Mesh creatation is ok. The # of cells is " << mesh.n_of_c() << endl;
}
else{
cout << "Mesh creatation is wrong." << endl;
}
nc=mesh.n_of_c();
for (i=0; i<nc; i++){
mesh.cell(i).setMflag(REFINE);
}
//ref.split(mesh);
ref.longest_edge(mesh);
if (sev.is_valid_mesh(mesh)){
cout << "Mesh refinement is ok. The # of cells is " << mesh.n_of_c() << endl;
}
else{
cout << "Mesh refinement is wrong." << endl;
}
nc=mesh.n_of_c();
for (i=0; i<nc; i++){
mesh.cell(i).setMflag(COARSEN);
}
cos.edge_collapse(mesh);
if (sev.is_valid_mesh(mesh)){
cout << "Mesh coarsening is ok. The # of cells is " << mesh.n_of_c() << endl;
}
else{
cout << "Mesh coarsening is wrong." << endl;
}
output.write_file(mesh, "newVertices.dat", "newCells.dat");
return 0;
}
File added
File added
Num,Name,e-mail,GitHub ID,Supervisor,Project Name,Project Topic,Traditional or Drasil or Other,GitHub Repos url,Branch,Prob State Approval?,Domain Expert Reviewer - Primary Reviewer,SRS: Secondary,VnV Plan:Secondary,MG + MIS or Drasil:Secondary
1,"Balaci,Jason",balacij@mcmaster.ca,balacij,Dr. Jacques Carette & Dr. Spencer Smith,BeamBend,Beam Bending,Drasil, https://github.com/balacij/Drasil/, beamBending,Approved,Sam,Mina,Deesha,Maryam
2,"Crawford,Sam Joseph",crawfs1@mcmaster.ca,samm82,Dr. Jacques Carette & Dr. Spencer Smith,ChemCode,Balancing chemical equations (might support more stoichiometry as a stretch goal),Drasil, https://github.com/samm82/Drasil, chemCode,Approved,Jason,Deesha,Maryam,Karen
3,"Mahdipour,Mina",mahdipoa@mcmaster.ca,MinMah23,Dr. Sebastien Mosser ,Inverted Pendulum,Pole Balancing,Traditional,https://github.com/MinMah23/CAS741-Project,main,Approved,Deesha,Maryam,Karen,Joachim
4,"Patel,Deesha Vipulkumar",pated193@mcmaster.ca,deeshapatel,Dr. Sebastien Mosser ,SolarCookerEnergyCalculation ,Solar Cooker,Traditional, https://github.com/DeeshaPatel/CAS-741-Solar-Cooker, main,Approved,Mina,Karen,Lesley,Sam
5,"Valian,Maryam",valianm@mcmaster.ca,maryamvalian,Dr. Jelle Hellings,Truss Tool,Truss Analysis Tool,Traditional,https://github.com/maryamvalian/project741,main,Approved,Lesley,Lesley,Joachim,Jason
6,"Wang,Karen",wangn14@mcmaster.ca,KarenKarenWang,Dr.William Farmer & Dr.Spencer Smith,Conserve energy,Saving energy by moving data center closer to generation,Traditional,https://github.com/KarenKarenWang/cas741_project1,main,Approved,Maryam,Joachim,Jason,Mina
7,"Wang,Zehong",wangz892@mcmaster.ca,zehongwong,Dr. Neerja Mhaskar,Population Growth,Population Growth Predicting,Drasil,https://github.com/zehongwong/CAS741_Proj,main,Approved,NA,NA,NA,NA
8,"Wheat,Lesley",wheatd@mcmaster.ca,LesleyWheat,Dr. Mohrenschildt and Dr. Habibi,CEWS,Data Separability Measurement,Traditional,https://github.com/LesleyWheat/CAS741_CEWS,main,Approved,Joachim,Sam,Mina,Deesha
9,"de Fourestier,Joachim",defourej@mcmaster.ca,joedf,Dr. Nabil Bassim,ImgBeamer,SEM image formation process simulator,Traditional,https://github.com/joedf/CAS741_w23,main,Approved,Karen,Jason,Sam,Lesley
,,,,,,,,,,,,,,
"In the cases where a presentation is made, the expert reviewer and the second reviewer will be assigned to ask questions during/after the presentation",,,,,,,,,,,,,,
Domain expert will also be assigned document inspection tasks by the document author,,,,,,,,,,,,,,
Num, Last Name, First Name, e-mail, GitHub ID, Supervisor, Project Name, Project Topic, Traditional or Drasil or Other, GitHub Repos url, Branch, Prob State Approval?, Domain Expert Reviewer - Primary Reviewer, SRS: Secondary, VnV Plan:Secondary, MG + MIS or Drasil:Secondary
0, Last Name, First Name, email@mcmaster.ca, githubid, Dr. X, projName, Project Title, traditional or Drasil, https://github.com/..., branch, Yes/No, name, name, name, name
1, Li, Yiding, liy443@mcmaster.ca, Tan630, Dr. Christopher Anand, agolearn, Derivative-free evolutionary optimizer for real-valued and higher-order functions, Traditional, https://github.com/Tan630/CAS741, main, YES, Fasil Cheema, Fatemeh, Tanya, Phil
2, Sochaniwsky, Adrian, sochania@mcmaster.ca, adrian-soch, Dr. v. Mohrenschildt, Attitude Check, IMU-based Attitude Estimation, Traditional, https://github.com/adrian-soch/attitude_check, main, YES, Hunter Ceranic, Fasil, Fatemeh, Tanya
3, Liu, Cynthia, liuy363@mcmaster.ca, CynthiaLiu0805, Dr. Spencer Smith, Bridge Corrosions, A Mathematical Model for Bridge Corrosion, Traditional, https://github.com/CynthiaLiu0805/BridgeCorrosion, main, YES, Phil, Hunter, Fasil, Fatemeh
4, Ceranic, Hunter, ceranich@mcmaster.ca, cer-hunter, Dr. Denise Geiskkovitch, OAR, Optical Alphabet Recognition using Logistic Regression, Traditional, https://github.com/cer-hunter/OAR-CAS741, main, YES, Adrian Sochaniwsky, Phil, Gaofeng, Yiding
5, Vreugdenhil, Valerie, vreugdev@mcmaster.ca, vgvreug, Dr. Ned Nedialkov, Stoichiometry Calculator, Stoichiometry calculator for chemical equations, Traditional, https://github.com/vgvreug/StoichCalc, main, YES, Gaofeng, Adrian, Phil, Hunter
6, Awan, Waqar, awanm15@mcmaster.ca, WaqarAwan376, Dr. Sebastien Mosser, Damped Harmonic Oscillator, Damped Harmonic Oscillator illustrated by online calculator, Traditional, https://github.com/WaqarAwan376/Damped_Harmonic_Oscillator-CAS741, main, YES, Hossain, Gaofeng, Adrian, Fasil
7, Mirzaei, Morteza, mirzam48@mcmaster.ca, mirzaim, Dr. Jake Doliskani , Inverted Pendulum Control Systems (IPCS), A control system for inverted pendulum problem, Traditional, https://github.com/mirzaim/ipcs, main, YES, Seyed Ali Mousavi, Hossain, Hunter, Adrian
8, Zhou, Gaofeng, zhoug28@mcmaster.ca, Zhou4truth, Prof.Ned.Nedialkov, Image Feature Detection, image processing problem, traditional, https://github.com/Zhou4truth/imageFeatureDetection, , YES, Valerie, Seyed Ali, Hossain, Xinyu
9, Wong, Kim Ying, wongk124@mcmaster.ca, gordonwky, Dr. Ned Nedialkov, Gaussian Mixture Model, Gaussian Mixture Model with EM algorithm, Traditional, https://github.com/gordonwky/GMM_EM, main, YES, Xinyu, Valerie, Seyed Ali, Hossain
10, Mousavi, Seyed Ali, mousas26@mcmaster.ca, alimousavi1997, Dr. Jake Doliskani, Recommender System, Movie Recommender using KNN algorithm, traditional, https://github.com/alimousavi1997/RecommSys, main , YES, Nada, Xinyu, Valerie, Gaofeng
11, Cheema, Fasil, cheemf8@mcmaster.ca , cheemf8 , Dr Lingyang Chu , Optimization Solver , Library of Optimization Solvers , traditional , https://github.com/FasilCheema/OptimizationLibrary, main , YES, Morteza Mirzaei, Nada, Xinyu, Valerie
12, Ma, Xinyu, ma209@mcmaster.ca, lele0007, Dr. Lingyang Chu, Image Segmentation, Retinal Vessel Segmentation, Traditional, https://github.com/lele0007/Blood-vessel-segmentation, main, YES, Kim Ying, Morteza, Nada, Seyed Ali
13, Du, Phil, dua11@mcmaster.ca, omltcat, Dr. Spencer Smith, Turbulent Flow, Synthetic Eddy for Turbulent Flow Simulation , Traditional, https://github.com/omltcat/turbulent-flow, main, YES, Cynthia, Kim Ying, Morteza, Nada
14, Elmasry, Nada, elmasn2@mcmaster.ca, NadaElmasry, Dr.Yingying Wang, Image Reconstruction and Segmentation, Brain Scans Processing, Traditional, https://github.com/NadaElmasry/3D-Image-Reconstruction-Segmentation, main, YES, Yi-Leng, Waqar, Kim Ying, Morteza
15, Chen, Yi-Leng, cheny997@mcmaster.ca, kypss94132, Dr. Ridha Khedri, Concrete Remaining Life Prediction, Predict remaining life of concrete based on weather data, Traditional, https://github.com/kypss94132/CAS741_YiLeng-Chen, main, YES, Atiyeh, Cynthia, Waqar, Kim Ying
16, Sayadi, Atiyeh, sayadia@mcmaster.ca, AtiyehSayadi, Dr. Ryszard Janicki, Centrality-In-Graphs, Centrality-In-Graphs, Traditional or Drasil, https://github.com/AtiyehSayadi/Centrality-In-Graphs, main, YES, Yiding, Tanya, Cynthia, Waqar
17, Djavaherpour, Tanya, djavahet@mcmaster.ca, tanya-jp, Dr. Stephen Kelly, ANN, Artificial Neural Network, Traditional, https://github.com/tanya-jp/ANN-CAS741, main, YES, Fatemeh, Atiyeh, Yi-Leng, Cynthia
18, Hossain, Al Jubair, hossaa27@mcmaster.ca, XessX, Dr.Yingying Wang, Physics Based Game, Angry Bird Alike, Traditional, https://github.com/XessX/Physics_game_based_on_Angry_Bird_Alike, main, YES, Waqar, Yiding, Atiyeh, Yi-Leng
19, Norouziani, Reyhaneh, norouf1@mcmaster.ca,rnorouziani, Dr. Onaizah Onaizah,Helmholtz-Coil-Current-Calculator,Helmholtz Coil Current Calculator for Target Magnetic Field, Traditional, https://github.com/rnorouziani/Helmholtz-Coil-Current-Calculator-CAS741, main, YES, Tanya, Yi-Leng, Yiding, Atiyeh
K 25
svn:wc:ra_dav:version-url
V 29
/cas741/!svn/ver/431/karcheba
END
10
dir
461
https://websvn.mcmaster.ca/cas741/karcheba
https://websvn.mcmaster.ca/cas741
2012-04-14T17:34:39.237106Z
431
karcheba
52a258de-497a-46c8-a41f-3222951566f9
mid-pde
dir
mg
dir
srs
dir
dynsws
dir
mis
dir
pde
dir
K 25
svn:wc:ra_dav:version-url
V 36
/cas741/!svn/ver/429/karcheba/dynsws
END
10
dir
461
https://websvn.mcmaster.ca/cas741/karcheba/dynsws
https://websvn.mcmaster.ca/cas741
2012-04-14T16:12:36.624284Z
429
karcheba
52a258de-497a-46c8-a41f-3222951566f9
trunk
dir
branches
dir
tags
dir
K 25
svn:wc:ra_dav:version-url
V 45
/cas741/!svn/ver/254/karcheba/dynsws/branches
END
10
dir
461
https://websvn.mcmaster.ca/cas741/karcheba/dynsws/branches
https://websvn.mcmaster.ca/cas741
2012-03-24T16:42:33.193078Z
254
karcheba
52a258de-497a-46c8-a41f-3222951566f9
K 25
svn:wc:ra_dav:version-url
V 41
/cas741/!svn/ver/254/karcheba/dynsws/tags
END
10
dir
461
https://websvn.mcmaster.ca/cas741/karcheba/dynsws/tags
https://websvn.mcmaster.ca/cas741
2012-03-24T16:42:33.193078Z
254
karcheba
52a258de-497a-46c8-a41f-3222951566f9