123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
-
-
-
-
-
-
-
- #include <FDEM1D>
- using namespace Lemma;
-
- int main(int argc, char** argv) {
-
- if (argc < 6) {
- std::cout << "Usage:\n";
- std::cout << "CircularLoop <radius> <centreNorthing> <centreEasting>"
- << " <numTurns> <npoints>\n" ;
- exit(EXIT_SUCCESS);
- }
-
- Real rad = atof(argv[1]);
- Real cx = atof(argv[2]);
- Real cy = atof(argv[3]);
- int nt = atoi(argv[4]);
- int np = atoi(argv[5]);
-
- auto wire = PolygonalWireAntenna::NewSP();
- wire->SetNumberOfPoints(np);
- wire->SetNumberOfTurns(nt);
- Real da = 2.*PI / (Real)(np-1);
- for (int ip=0; ip<np-1; ++ip) {
- wire->SetPoint(ip, cx+rad*std::sin(da*static_cast<Real>(ip)),
- cy+rad*std::cos(da*static_cast<Real>(ip)), -1e-3);
- }
- wire->SetPoint(np-1, cx, cy+rad, -1e-3);
-
- std::cout << *wire << std::endl;
-
-
-
- }
|