-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
206 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
#include "mesh/mesh.hpp" | ||
#include <iostream> | ||
#include <sstream> | ||
|
||
void specfem::mesh::free_surface<specfem::dimension::type::dim3>::print() | ||
const { | ||
std::string | ||
specfem::mesh::free_surface<specfem::dimension::type::dim3>::print() const { | ||
|
||
std::ostringstream message; | ||
|
||
// Print variables and metadata | ||
std::cout << "Absorbing Boundary Metadata:" << std::endl; | ||
std::cout << "================================================" << std::endl; | ||
std::cout << " nelements:.............. " << nelements << std::endl; | ||
std::cout << " ngllsquare:............. " << ngllsquare << std::endl; | ||
std::cout << " num_free_surface_faces:. " << num_free_surface_faces | ||
<< std::endl; | ||
message << "Absorbing Boundary Metadata:" | ||
<< "\n"; | ||
message << "================================================" | ||
<< "\n"; | ||
message << " nelements:.............. " << nelements << "\n"; | ||
message << " ngllsquare:............. " << ngllsquare << "\n"; | ||
message << " num_free_surface_faces:. " << num_free_surface_faces << "\n"; | ||
|
||
// Print the absorbing ispec metadata | ||
std::cout << " Array sizes:" << std::endl; | ||
std::cout << " -----------------------------------------------" << std::endl; | ||
std::cout << " ispec:.................. " << ispec.extent(0) << std::endl; | ||
std::cout << " ijk:.................... " << ijk.extent(0) << " " | ||
<< ijk.extent(1) << " " << ijk.extent(2) << std::endl; | ||
std::cout << " jacobian2Dw:............ " << jacobian2Dw.extent(0) << " " | ||
<< jacobian2Dw.extent(1) << std::endl; | ||
std::cout << " normal:................. " << normal.extent(0) << " " | ||
<< normal.extent(1) << " " << normal.extent(2) << std::endl; | ||
message << " Array sizes:" | ||
<< "\n"; | ||
message << " -----------------------------------------------" | ||
<< "\n"; | ||
message << " ispec:.................. " << ispec.extent(0) << "\n"; | ||
message << " ijk:.................... " << ijk.extent(0) << " " | ||
<< ijk.extent(1) << " " << ijk.extent(2) << "\n"; | ||
message << " jacobian2Dw:............ " << jacobian2Dw.extent(0) << " " | ||
<< jacobian2Dw.extent(1) << "\n"; | ||
message << " normal:................. " << normal.extent(0) << " " | ||
<< normal.extent(1) << " " << normal.extent(2) << "\n"; | ||
|
||
return message.str(); | ||
} |
156 changes: 84 additions & 72 deletions
156
src/mesh/dim3/coupled_interfaces/coupled_interfaces.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,110 @@ | ||
#include "mesh/mesh.hpp" | ||
#include <iostream> | ||
|
||
void specfem::mesh::coupled_interfaces<specfem::dimension::type::dim3>::print() | ||
std::string | ||
specfem::mesh::coupled_interfaces<specfem::dimension::type::dim3>::print() | ||
const { | ||
|
||
std::ostringstream message; | ||
|
||
if (acoustic_elastic) { | ||
std::cout << "Acoustic Elastic Interface Metadata:" << std::endl; | ||
std::cout << "================================================" | ||
<< std::endl; | ||
std::cout << " ngllsquare:............... " << ngllsquare << std::endl; | ||
std::cout << " num_coupling_ac_el_faces:. " << num_coupling_ac_el_faces | ||
<< std::endl; | ||
message << "Acoustic Elastic Interface Metadata:" | ||
<< "\n"; | ||
message << "================================================" | ||
<< "\n"; | ||
message << " ngllsquare:............... " << ngllsquare << "\n"; | ||
message << " num_coupling_ac_el_faces:. " << num_coupling_ac_el_faces | ||
<< "\n"; | ||
|
||
// Print the acoustic elastic interface metadata | ||
std::cout << " Array sizes:" << std::endl; | ||
std::cout << " -----------------------------------------------" | ||
<< std::endl; | ||
std::cout << " ispec:.................. " | ||
<< acoustic_elastic_interface.ispec.extent(0) << std::endl; | ||
std::cout << " ijk:.................... " | ||
<< acoustic_elastic_interface.ijk.extent(0) << " " | ||
<< acoustic_elastic_interface.ijk.extent(1) << " " | ||
<< acoustic_elastic_interface.ijk.extent(2) << std::endl; | ||
std::cout << " jacobian2Dw:............ " | ||
<< acoustic_elastic_interface.jacobian2Dw.extent(0) << " " | ||
<< acoustic_elastic_interface.jacobian2Dw.extent(1) << std::endl; | ||
std::cout << " normal:................. " | ||
<< acoustic_elastic_interface.normal.extent(0) << " " | ||
<< acoustic_elastic_interface.normal.extent(1) << " " | ||
<< acoustic_elastic_interface.normal.extent(2) << std::endl; | ||
message << " Array sizes:" | ||
<< "\n"; | ||
message << " -----------------------------------------------" | ||
<< "\n"; | ||
message << " ispec:.................. " | ||
<< acoustic_elastic_interface.ispec.extent(0) << "\n"; | ||
message << " ijk:.................... " | ||
<< acoustic_elastic_interface.ijk.extent(0) << " " | ||
<< acoustic_elastic_interface.ijk.extent(1) << " " | ||
<< acoustic_elastic_interface.ijk.extent(2) << "\n"; | ||
message << " jacobian2Dw:............ " | ||
<< acoustic_elastic_interface.jacobian2Dw.extent(0) << " " | ||
<< acoustic_elastic_interface.jacobian2Dw.extent(1) << "\n"; | ||
message << " normal:................. " | ||
<< acoustic_elastic_interface.normal.extent(0) << " " | ||
<< acoustic_elastic_interface.normal.extent(1) << " " | ||
<< acoustic_elastic_interface.normal.extent(2) << "\n"; | ||
} else { | ||
std::cout << "No acoustic elastic interfaces" << std::endl; | ||
message << "No acoustic elastic interfaces" | ||
<< "\n"; | ||
} | ||
|
||
if (acoustic_poroelastic) { | ||
|
||
std::cout << "Acoustic Poroelastic Interface Metadata:" << std::endl; | ||
std::cout << "================================================" | ||
<< std::endl; | ||
std::cout << " ngllsquare:............... " << ngllsquare << std::endl; | ||
std::cout << " num_coupling_ac_po_faces:. " << num_coupling_ac_po_faces | ||
<< std::endl; | ||
message << "Acoustic Poroelastic Interface Metadata:" | ||
<< "\n"; | ||
message << "================================================" | ||
<< "\n"; | ||
message << " ngllsquare:............... " << ngllsquare << "\n"; | ||
message << " num_coupling_ac_po_faces:. " << num_coupling_ac_po_faces | ||
<< "\n"; | ||
|
||
// Print the acoustic poroelastic interface metadata | ||
std::cout << " Array sizes:" << std::endl; | ||
std::cout << " -----------------------------------------------" | ||
<< std::endl; | ||
std::cout << " ispec:.................. " | ||
<< acoustic_poroelastic_interface.ispec.extent(0) << std::endl; | ||
std::cout << " ijk:.................... " | ||
<< acoustic_poroelastic_interface.ijk.extent(0) << " " | ||
<< acoustic_poroelastic_interface.ijk.extent(1) << " " | ||
<< acoustic_poroelastic_interface.ijk.extent(2) << std::endl; | ||
std::cout << " jacobian2Dw:............ " | ||
<< acoustic_poroelastic_interface.jacobian2Dw.extent(0) << " " | ||
<< acoustic_poroelastic_interface.jacobian2Dw.extent(1) | ||
<< std::endl; | ||
std::cout << " normal:................. " | ||
<< acoustic_poroelastic_interface.normal.extent(0) << " " | ||
<< acoustic_poroelastic_interface.normal.extent(1) << " " | ||
<< acoustic_poroelastic_interface.normal.extent(2) << std::endl; | ||
message << " Array sizes:" | ||
<< "\n"; | ||
message << " -----------------------------------------------" | ||
<< "\n"; | ||
message << " ispec:.................. " | ||
<< acoustic_poroelastic_interface.ispec.extent(0) << "\n"; | ||
message << " ijk:.................... " | ||
<< acoustic_poroelastic_interface.ijk.extent(0) << " " | ||
<< acoustic_poroelastic_interface.ijk.extent(1) << " " | ||
<< acoustic_poroelastic_interface.ijk.extent(2) << "\n"; | ||
message << " jacobian2Dw:............ " | ||
<< acoustic_poroelastic_interface.jacobian2Dw.extent(0) << " " | ||
<< acoustic_poroelastic_interface.jacobian2Dw.extent(1) << "\n"; | ||
message << " normal:................. " | ||
<< acoustic_poroelastic_interface.normal.extent(0) << " " | ||
<< acoustic_poroelastic_interface.normal.extent(1) << " " | ||
<< acoustic_poroelastic_interface.normal.extent(2) << "\n"; | ||
} else { | ||
std::cout << "No acoustic poroelastic interfaces" << std::endl; | ||
message << "No acoustic poroelastic interfaces" | ||
<< "\n"; | ||
} | ||
|
||
if (elastic_poroelastic) { | ||
|
||
std::cout << "Elastic Poroelastic Interface Metadata:" << std::endl; | ||
std::cout << "================================================" | ||
<< std::endl; | ||
std::cout << " ngllsquare:............... " << ngllsquare << std::endl; | ||
std::cout << " num_coupling_el_po_faces:. " << num_coupling_el_po_faces | ||
<< std::endl; | ||
message << "Elastic Poroelastic Interface Metadata:" | ||
<< "\n"; | ||
message << "================================================" | ||
<< "\n"; | ||
message << " ngllsquare:............... " << ngllsquare << "\n"; | ||
message << " num_coupling_el_po_faces:. " << num_coupling_el_po_faces | ||
<< "\n"; | ||
|
||
// Print the elastic poroelastic interface metadata | ||
std::cout << " Array sizes:" << std::endl; | ||
std::cout << " -----------------------------------------------" | ||
<< std::endl; | ||
std::cout << " ispec:.................. " | ||
<< elastic_poroelastic_interface.ispec.extent(0) << std::endl; | ||
std::cout << " ijk:.................... " | ||
<< elastic_poroelastic_interface.ijk.extent(0) << " " | ||
<< elastic_poroelastic_interface.ijk.extent(1) << " " | ||
<< elastic_poroelastic_interface.ijk.extent(2) << std::endl; | ||
std::cout << " jacobian2Dw:............ " | ||
<< elastic_poroelastic_interface.jacobian2Dw.extent(0) << " " | ||
<< elastic_poroelastic_interface.jacobian2Dw.extent(1) | ||
<< std::endl; | ||
std::cout << " normal:................. " | ||
<< elastic_poroelastic_interface.normal.extent(0) << " " | ||
<< elastic_poroelastic_interface.normal.extent(1) << " " | ||
<< elastic_poroelastic_interface.normal.extent(2) << std::endl; | ||
message << " Array sizes:" | ||
<< "\n"; | ||
message << " -----------------------------------------------" | ||
<< "\n"; | ||
message << " ispec:.................. " | ||
<< elastic_poroelastic_interface.ispec.extent(0) << "\n"; | ||
message << " ijk:.................... " | ||
<< elastic_poroelastic_interface.ijk.extent(0) << " " | ||
<< elastic_poroelastic_interface.ijk.extent(1) << " " | ||
<< elastic_poroelastic_interface.ijk.extent(2) << "\n"; | ||
message << " jacobian2Dw:............ " | ||
<< elastic_poroelastic_interface.jacobian2Dw.extent(0) << " " | ||
<< elastic_poroelastic_interface.jacobian2Dw.extent(1) << "\n"; | ||
message << " normal:................. " | ||
<< elastic_poroelastic_interface.normal.extent(0) << " " | ||
<< elastic_poroelastic_interface.normal.extent(1) << " " | ||
<< elastic_poroelastic_interface.normal.extent(2) << "\n"; | ||
|
||
} else { | ||
std::cout << "No elastic poroelastic interfaces" << std::endl; | ||
message << "No elastic poroelastic interfaces" | ||
<< "\n"; | ||
} | ||
|
||
return message.str(); | ||
} |
Oops, something went wrong.