/usr/share/doc/freefem++/examples/examples++-load/funcTemplate.edp is in freefem++-doc 3.19.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | load "funcTemplate"
mesh Th=square(3,3);
fespace Vh(Th,P1);
Vh N;
for(int i=0; i<N.n; i++) {
N[][i] = i+0.1;
}
Vh P = 2.0;
Vh uh1;
real a;
// OUTPUT:
// uh1[]
// INPUT:
// N[]
// P[]
// Description:
// make the product N[] .* P[]
//
CppModTemplate3(uh1[], N[], P[]);
cout << endl;
cout << "uh1: " << uh1[].min << " " << uh1[].max << endl;
CppModTemplate4(uh1[], N[], P[], P[]);
cout << endl;
cout << "uh1: " << uh1[].min << " " << uh1[].max << endl;
CppModTemplate5(uh1[], N[], P[], P[], P[]);
cout << endl;
cout << "5 args: uh1: " << uh1[].min << " " << uh1[].max << endl;
CppModTemplate6(uh1[], N[], P[], P[], P[], P[]);
cout << endl;
cout << "6 args: uh1: " << uh1[].min << " " << uh1[].max << endl;
CppModTemplate7(uh1[], N[], P[], P[], P[], P[], P[]);
cout << endl;
cout << "7 args: uh1: " << uh1[].min << " " << uh1[].max << endl;
CppModTemplate8(uh1[], N[], P[], P[], P[], P[], P[], P[]);
cout << endl;
cout << "8 args: uh1: " << uh1[].min << " " << uh1[].max << endl;
cout << " funcs1 " << funcs1(2) << endl;
cout << " funcs2 " << funcs2(2,3) << endl;
cout << " funcs3 " << funcs3(1,2,3) << endl;
|