Skip to content

Commit

Permalink
Puts filesystem::Project into utils
Browse files Browse the repository at this point in the history
  • Loading branch information
lmdiazangulo authored and carlosgonzalez-elemwave committed Jun 28, 2023
1 parent 84d9a5f commit 94999b2
Show file tree
Hide file tree
Showing 24 changed files with 163 additions and 189 deletions.
1 change: 0 additions & 1 deletion cmakePackage/opensembaPackageInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ configure_file(
install(
TARGETS opensemba
opensemba_core
opensemba_core_filesystem
opensemba_core_geometry
opensemba_core_math
opensemba_core_outputrequest
Expand Down
2 changes: 0 additions & 2 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_subdirectory(model/ model/)
add_subdirectory(math/ math/)
add_subdirectory(geometry/ geometry/)
add_subdirectory(outputRequest/ outputRequest/)
add_subdirectory(filesystem/ filesystem/)
add_subdirectory(physicalModel/ physicalModel/)
add_subdirectory(source/ source/)

Expand All @@ -19,7 +18,6 @@ add_library(opensemba_core STATIC
)

target_link_libraries(opensemba_core
opensemba_core_filesystem
opensemba_core_geometry
opensemba_core_math
opensemba_core_physicalmodel
Expand Down
4 changes: 2 additions & 2 deletions src/core/ProblemDescription.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#include "core/source/Group.h"
#include "core/outputRequest/Group.h"
#include "core/model/Model.h"
#include "core/filesystem/Project.h"
#include "core/util/Project.h"

namespace SEMBA {

template<typename M = UnstructuredModel>
class ProblemDescriptionBase {
public:
FileSystem::Project project;
util::Project project;
Geometry::Grid3 grids;
SourceGroup sources;
nlohmann::json analysis;
Expand Down
15 changes: 0 additions & 15 deletions src/core/filesystem/CMakeLists.txt

This file was deleted.

81 changes: 0 additions & 81 deletions src/core/filesystem/Project.h

This file was deleted.

3 changes: 1 addition & 2 deletions src/core/physicalModel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ add_library(opensemba_core_physicalmodel STATIC
"wire/Extremes.cpp"
"wire/Wire.cpp"
)
target_link_libraries(opensemba_core_physicalmodel opensemba_core_math
opensemba_core_filesystem)
target_link_libraries(opensemba_core_physicalmodel opensemba_core_math)
11 changes: 6 additions & 5 deletions src/core/physicalModel/physicalModels.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#pragma once

#include "Bound.h"
#include "Gap.h"
#include "Predefined.h"
#include "wire/Wire.h"
#include "multiport/Dispersive.h"
#include "multiport/Predefined.h"
#include "multiport/RLC.h"
#include "Predefined.h"
#include "surface/Multilayer.h"
#include "surface/SIBC.h"
#include "surface/SIBCFile.h"
#include "volume/Anisotropic.h"
#include "volume/Classic.h"
#include "volume/Dispersive.h"
#include "volume/PML.h"
#include "volume/Anisotropic.h"
#include "wire/Wire.h"
#include "wire/Extremes.h"
#include "volume/Dispersive.h"
2 changes: 1 addition & 1 deletion src/core/physicalModel/surface/SIBC.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "core/math/matrix/Static.h"
#include "core/filesystem/Project.h"
#include "core/util/Project.h"

#include "Surface.h"

Expand Down
4 changes: 2 additions & 2 deletions src/core/physicalModel/surface/SIBCFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Surface {

SIBCFile::SIBCFile(const Id id,
const std::string& name,
const FileSystem::Project& file)
const util::Project& file)
: Identifiable<Id>(id),
PhysicalModel(name),
file_(file) {
Expand All @@ -18,7 +18,7 @@ SIBCFile::SIBCFile(const Id id,
}
}

const FileSystem::Project SIBCFile::getFile() const {
const util::Project SIBCFile::getFile() const {
return file_;
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/physicalModel/surface/SIBCFile.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "core/math/matrix/Static.h"
#include "core/filesystem/Project.h"
#include "core/util/Project.h"

#include "Surface.h"

Expand All @@ -14,16 +14,16 @@ class SIBCFile : public virtual Surface {
SIBCFile();
SIBCFile(const Id id,
const std::string& name,
const FileSystem::Project& file);
const util::Project& file);

virtual std::unique_ptr<PhysicalModel> clone() const override {
return std::make_unique<SIBCFile>(*this);
}

const FileSystem::Project getFile() const;
const util::Project getFile() const;

protected:
FileSystem::Project file_;
util::Project file_;
};

} /* namespace Surface */
Expand Down
4 changes: 2 additions & 2 deletions src/core/physicalModel/volume/Dispersive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Dispersive::Dispersive(const Id id,

Dispersive::Dispersive(const Id id,
const std::string& name,
const FileSystem::Project& file)
const util::Project& file)
: Identifiable<Id>(id),
PhysicalModel(name) {
rEpsInfty_ = 1.0;
Expand Down Expand Up @@ -110,7 +110,7 @@ void Dispersive::addPole(
return;
}

const FileSystem::Project Dispersive::getFile() const {
const util::Project Dispersive::getFile() const {
return file_;
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/physicalModel/volume/Dispersive.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <exception>
#include <utility>

#include "core/filesystem/Project.h"
#include "core/util/Project.h"
#include "Volume.h"

namespace SEMBA {
Expand All @@ -26,7 +26,7 @@ class Dispersive : public virtual Volume {
std::vector<PoleResidue>());
Dispersive(const Id id,
const std::string& name,
const FileSystem::Project& file);
const util::Project& file);
Dispersive(const Dispersive& rhs);
virtual ~Dispersive();

Expand All @@ -43,12 +43,12 @@ class Dispersive : public virtual Volume {
bool isSimplyConductive() const;
bool isDispersive() const;

const FileSystem::Project getFile() const;
const util::Project getFile() const;

protected:
math::Real rEpsInfty_, rMuInfty_; // @ InftyFreq.
std::vector<PoleResidue> poleResidue_; // Residues for dispers model. c_p.
FileSystem::Project file_;
util::Project file_;
void addPole(const std::complex<math::Real>& pole_,
const std::complex<math::Real>& res_);
};
Expand Down
3 changes: 1 addition & 2 deletions src/core/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ add_library(opensemba_core_source
"magnitude/Magnitude.cpp"
"magnitude/Numerical.cpp"
)
target_link_libraries(opensemba_core_source opensemba_core_geometry
opensemba_core_filesystem)
target_link_libraries(opensemba_core_source opensemba_core_geometry)
4 changes: 2 additions & 2 deletions src/core/source/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Source& Source::operator=(const Source& rhs)


void Source::convertToNumerical(
const FileSystem::Project& file,
const util::Project& file,
const math::Real step,
const math::Real finalTime)
{
Expand All @@ -44,7 +44,7 @@ void Source::convertToNumerical(
magnitude_ = std::move(newMagnitude);
}

Magnitude::Numerical Source::exportToFile(const FileSystem::Project& file,
Magnitude::Numerical Source::exportToFile(const util::Project& file,
const math::Real step,
const math::Real finalTime) const {
if(magnitude_->is<Magnitude::Numerical>()) {
Expand Down
6 changes: 3 additions & 3 deletions src/core/source/Source.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "core/geometry/element/Group.h"
#include "core/filesystem/Project.h"
#include "core/util/Project.h"
#include "core/util/Class.h"
#include "core/util/Identifiable.h"
#include "core/util/Identification.h"
Expand Down Expand Up @@ -29,11 +29,11 @@ class Source : public virtual util::Identifiable<Id>,

virtual std::string getName() const = 0;

void convertToNumerical(const FileSystem::Project& file,
void convertToNumerical(const util::Project& file,
const math::Real step,
const math::Real finalTime);

Magnitude::Numerical exportToFile(const FileSystem::Project& file,
Magnitude::Numerical exportToFile(const util::Project& file,
const math::Real step,
const math::Real finalTime) const;
const Magnitude::Magnitude* getMagnitude() const { return magnitude_.get(); }
Expand Down
4 changes: 2 additions & 2 deletions src/core/source/magnitude/Numerical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ namespace SEMBA {
namespace Source {
namespace Magnitude {

Numerical::Numerical(const FileSystem::Project& fileIn) :
Numerical::Numerical(const util::Project& fileIn) :
Magnitude(new math::function::LinearInterpolation<math::Real, math::Real>(fileIn)),
file(fileIn)
{}

Numerical::Numerical(const FileSystem::Project& fileIn,
Numerical::Numerical(const util::Project& fileIn,
const Magnitude& mag,
const math::Real timeStep,
const math::Real finalTime)
Expand Down
10 changes: 5 additions & 5 deletions src/core/source/magnitude/Numerical.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "Magnitude.h"
#include "core/filesystem/Project.h"
#include "core/util/Project.h"

namespace SEMBA {
namespace Source {
Expand All @@ -11,8 +11,8 @@ class Numerical : public virtual Magnitude {
public:
Numerical() = default;
Numerical(const Numerical&) = default;
Numerical(const FileSystem::Project& filename);
Numerical(const FileSystem::Project& filename,
Numerical(const util::Project& filename);
Numerical(const util::Project& filename,
const Magnitude& mag,
const math::Real timeStep,
const math::Real finalTime);
Expand All @@ -24,11 +24,11 @@ class Numerical : public virtual Magnitude {
bool operator==(const Numerical&) const;
math::Real evaluate(const math::Real time) const;

FileSystem::Project getFile() const { return file; };
util::Project getFile() const { return file; };

private:
static const std::size_t defaultNumberOfSteps = 1000;
FileSystem::Project file;
util::Project file;

};

Expand Down
Loading

0 comments on commit 94999b2

Please sign in to comment.