Skip to content

Commit

Permalink
fixed ispc & removed AVX2 kernels
Browse files Browse the repository at this point in the history
still need to implement the trefftz cd kernel

rip avx2
  • Loading branch information
samayala22 committed Feb 14, 2024
1 parent 0713929 commit 655d7e7
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 352 deletions.
23 changes: 23 additions & 0 deletions mesh/infinite_rectangular_2x8.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
1
3 9 1
0.0000000000000000 0.50000000000000000 1.0000000000000000 0.0000000000000000
0.50000000000000000 1.0000000000000000 0.0000000000000000 0.50000000000000000
1.0000000000000000 0.0000000000000000 0.50000000000000000 1.0000000000000000
0.0000000000000000 0.50000000000000000 1.0000000000000000 0.0000000000000000
0.50000000000000000 1.0000000000000000 0.0000000000000000 0.50000000000000000
1.0000000000000000 0.0000000000000000 0.50000000000000000 1.0000000000000000
0.0000000000000000 0.50000000000000000 1.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 3750.0000000000000
3750.0000000000005 3750.0000000000000 7500.0000000000000 7500.0000000000009
7500.0000000000000 11250.000000000000 11250.000000000000 11250.000000000000
15000.000000000000 15000.000000000002 15000.000000000000 18750.000000000000
18750.000000000000 18750.000000000000 17500.000000000000 17500.000000000000
17500.000000000000 13750.000000000000 13750.000000000000 13750.000000000000
10000.000000000000 10000.000000000000 10000.000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000
4 changes: 2 additions & 2 deletions tests/test_non_linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ int main(int argc, char** argv) {
const std::vector<std::string> backends = {"cpu"};
std::vector<std::pair<std::string, std::unique_ptr<LiftCurveFunctor>>> lift_curves;
lift_curves.emplace_back(std::make_pair("spallart1", std::make_unique<SpallartLiftCurve>(1.2f, 0.28f, 0.02f, 2.f*PI_f, 2.f*PI_f)));
lift_curves.emplace_back(std::make_pair("spallart2", std::make_unique<SpallartLiftCurve>(0.72f, 0.28f, 0.04f, 2.f*PI_f, 1.5f*PI_f)));
lift_curves.emplace_back(std::make_pair("polar", std::make_unique<ThinAirfoilPolarLiftCurve>()));
// lift_curves.emplace_back(std::make_pair("spallart2", std::make_unique<SpallartLiftCurve>(0.72f, 0.28f, 0.04f, 2.f*PI_f, 1.5f*PI_f)));
// lift_curves.emplace_back(std::make_pair("polar", std::make_unique<ThinAirfoilPolarLiftCurve>()));

std::vector<f32> test_alphas = {0, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
std::transform(test_alphas.begin(), test_alphas.end(), test_alphas.begin(), to_radians);
Expand Down
7 changes: 4 additions & 3 deletions vlm/backends/cpu/include/vlm_backend_cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@

namespace vlm {

class BackendGeneric : public Backend {
class BackendCPU : public Backend {
public:
std::vector<f32> lhs;
std::vector<f32> rhs;
std::vector<i32> ipiv;
std::vector<f32> gamma;
std::vector<f32> delta_gamma;
std::vector<f32> trefftz_buffer;

BackendGeneric(Mesh& mesh);
~BackendGeneric();
BackendCPU(Mesh& mesh);
~BackendCPU();
void reset() override;
void compute_lhs(const FlowData& flow) override;
void compute_rhs(const FlowData& flow) override;
Expand Down
3 changes: 2 additions & 1 deletion vlm/backends/cpu/include/vlm_backend_cpu_kernels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ void kernel_influence(
f32 normalx[], f32 normaly[], f32 normalz[],
u32 ia, u32 lidx, f32 sigma_p4
);
}
}

Loading

0 comments on commit 655d7e7

Please sign in to comment.