Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
[submodule "libdiskpp/contrib/matplotplusplus"]
path = libdiskpp/contrib/matplotplusplus
url = https://github.com/alandefreitas/matplotplusplus/
[submodule "libdiskpp/contrib/spectra"]
path = libdiskpp/contrib/spectra
url = https://github.com/yixuan/spectra.git
86 changes: 86 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"files.associations": {
".inc": ".f90",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp",
"variant": "cpp",
"format": "cpp",
"text_encoding": "cpp",
"csignal": "cpp",
"strstream": "cpp",
"bitset": "cpp",
"cfenv": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"condition_variable": "cpp",
"forward_list": "cpp",
"regex": "cpp",
"source_location": "cpp",
"hash_map": "cpp",
"future": "cpp",
"mutex": "cpp",
"shared_mutex": "cpp",
"stdfloat": "cpp",
"typeindex": "cpp",
"valarray": "cpp"
}
}
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ endif()
#add_subdirectory(contrib/eigen)
find_package(Eigen3 REQUIRED)
set(LINK_LIBS ${LINK_LIBS} Eigen3::Eigen)
include_directories(libdiskpp/contrib/spectra/include)

######################################################################
## ~jburkardt code
Expand Down Expand Up @@ -279,3 +280,5 @@ set(CPACK_DEBIAN_PACKAGE_SECTION "science")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6,libgcc1,libstdc++6")

include(CPack)


10 changes: 10 additions & 0 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,13 @@ if (BUILD_APP_VEM_2D)
add_subdirectory(vem2d)
endif()


option(BUILD_APP_UNFITTED_HHO "Build unfitted_HHO application" ON)
if (BUILD_APP_UNFITTED_HHO)
add_subdirectory(unfitted_HHO)
endif()

option(BUILD_APP_WAVE_PROPAGATION "Build wave_propagation application" ON)
if (BUILD_APP_WAVE_PROPAGATION)
add_subdirectory(wave_propagation)
endif()
5 changes: 5 additions & 0 deletions apps/unfitted_HHO/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(LINK_LIBS diskpp)

add_executable(unfitted_HHO src/unfitted_HHO.cpp)
target_link_libraries(unfitted_HHO ${LINK_LIBS})
install(TARGETS unfitted_HHO RUNTIME DESTINATION bin)
9 changes: 9 additions & 0 deletions apps/unfitted_HHO/src/unfitted_HHO.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>
#include <regex>
#include "diskpp/loaders/loader.hpp"
#include "diskpp/mesh/cut_mesh.hpp"

int main(int argc, char **argv) {


}
6 changes: 6 additions & 0 deletions apps/wave_propagation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set(LINK_LIBS diskpp)

add_executable(wave_propagation src/wave_propagation.cpp)
target_link_libraries(wave_propagation ${LINK_LIBS})

install(TARGETS wave_propagation RUNTIME DESTINATION bin)
2 changes: 2 additions & 0 deletions apps/wave_propagation/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

add_subdirectory(common)
35 changes: 35 additions & 0 deletions apps/wave_propagation/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

set(fitted_waves_sources ${fitted_waves_sources}
#${CMAKE_CURRENT_SOURCE_DIR}/fitted_geometry_builders.cpp
PARENT_SCOPE)

set(fitted_waves_headers ${fitted_waves_headers}
${CMAKE_CURRENT_SOURCE_DIR}/display_settings.hpp
${CMAKE_CURRENT_SOURCE_DIR}/preprocessor.hpp
${CMAKE_CURRENT_SOURCE_DIR}/postprocessor.hpp
${CMAKE_CURRENT_SOURCE_DIR}/acoustic_material_data.hpp
${CMAKE_CURRENT_SOURCE_DIR}/elastic_material_data.hpp
${CMAKE_CURRENT_SOURCE_DIR}/scal_analytic_functions.hpp
${CMAKE_CURRENT_SOURCE_DIR}/vec_analytic_functions.hpp
${CMAKE_CURRENT_SOURCE_DIR}/scal_vec_analytic_functions.hpp
${CMAKE_CURRENT_SOURCE_DIR}/fitted_geometry_builders.hpp
${CMAKE_CURRENT_SOURCE_DIR}/assembly_index.hpp
${CMAKE_CURRENT_SOURCE_DIR}/acoustic_one_field_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/acoustic_two_fields_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/elastodynamic_one_field_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/elastodynamic_two_fields_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/elastodynamic_three_fields_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/elastoacoustic_two_fields_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/elastoacoustic_four_fields_assembler.hpp
${CMAKE_CURRENT_SOURCE_DIR}/fitted_geometry_builders.hpp
${CMAKE_CURRENT_SOURCE_DIR}/linear_solver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/dirk_hho_scheme.hpp
${CMAKE_CURRENT_SOURCE_DIR}/erk_hho_scheme.hpp
${CMAKE_CURRENT_SOURCE_DIR}/ssprk_hho_scheme.hpp
${CMAKE_CURRENT_SOURCE_DIR}/dirk_butcher_tableau.hpp
${CMAKE_CURRENT_SOURCE_DIR}/erk_butcher_tableau.hpp
${CMAKE_CURRENT_SOURCE_DIR}/ssprk_shu_osher_tableau.hpp
${CMAKE_CURRENT_SOURCE_DIR}/lsrk_butcher_tableau.hpp
${CMAKE_CURRENT_SOURCE_DIR}/sourceterm.hpp
PARENT_SCOPE)

91 changes: 91 additions & 0 deletions apps/wave_propagation/src/common/acoustic_material_data.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
//
// acoustic_material_data.hpp
// acoustics
//
// Created by Omar Durán on 4/14/20.
//

#pragma once
#ifndef acoustic_material_data_hpp
#define acoustic_material_data_hpp

#include <stdio.h>

template<typename T = double>
class acoustic_material_data {

/// Fluid density
T m_rho;

/// Compressional P-wave velocity
T m_vp;

public:

/// Default constructor
acoustic_material_data(T rho, T vp){
m_rho = rho;
m_vp = vp;
}

/// Copy constructor
acoustic_material_data(const acoustic_material_data & other){
m_rho = other.m_rho;
m_vp = other.m_vp;
}

/// Assignement constructor
const acoustic_material_data & operator=(const acoustic_material_data & other){

// check for self-assignment
if(&other == this){
return *this;
}

m_rho = other.m_rho;
m_vp = other.m_vp;
return *this;

}

/// Desconstructor
virtual ~acoustic_material_data(){

}

/// Print class attributes
virtual void Print(std::ostream &out = std::cout) const{
out << "\n density = " << m_rho;
out << "\n p-wave velocity = " << m_vp;
}

/// Print class attributes
friend std::ostream & operator<<( std::ostream& out, const acoustic_material_data & material ){
material.Print(out);
return out;
}

void Set_rho(T rho)
{
m_rho = rho;
}

T rho()
{
return m_rho;
}


void Set_vp(T vp)
{
m_vp = vp;
}

T vp()
{
return m_vp;
}

};

#endif /* acoustic_material_data_hpp */
Loading