1 #ifndef ABLATELIBRARY_FIELDDESCRIPTION_HPP 
    2 #define ABLATELIBRARY_FIELDDESCRIPTION_HPP 
    7 #include <parameters/parameters.hpp> 
   11 #include "domain/field.hpp" 
   12 #include "domain/region.hpp" 
   13 #include "fieldDescriptor.hpp" 
   15 namespace ablate::domain {
 
   24     inline const static std::string DIMENSION = 
"_DIMENSION_";
 
   25     inline const static std::vector<std::string> ONECOMPONENT = {
"_"};
 
   28     const std::string name;
 
   31     const std::string prefix;
 
   34     std::vector<std::string> components = {
"_"};
 
   37     const enum FieldLocation location = FieldLocation::SOL;
 
   40     const enum FieldType type = FieldType::FEM;
 
   43     const std::shared_ptr<domain::Region> region;
 
   46     const std::vector<std::string> tags;
 
   48     FieldDescription(std::string name, 
const std::string& prefix, 
const std::vector<std::string>& components, FieldLocation location, FieldType type, std::shared_ptr<domain::Region> = {},
 
   49                      const std::shared_ptr<parameters::Parameters>& = {}, std::vector<std::string> tags = {});
 
   57     std::vector<std::shared_ptr<FieldDescription>> 
GetFields() 
override;
 
   70     inline std::shared_ptr<FieldDescription> 
Specialize(FieldType typeIn, std::shared_ptr<domain::Region> regionIn, std::shared_ptr<parameters::Parameters> optionsIn = {},
 
   71                                                         std::vector<std::string> tagsIn = {}) {
 
   72         return std::make_shared<FieldDescription>(name, prefix, components, location, typeIn, regionIn, optionsIn, tagsIn);
 
   77     std::shared_ptr<parameters::Parameters> options;
 
   80     mutable PetscOptions petscOptions = 
nullptr;
 
Definition: fieldDescriptor.hpp:15
 
Definition: fieldDescription.hpp:20
 
std::shared_ptr< FieldDescription > Specialize(FieldType typeIn, std::shared_ptr< domain::Region > regionIn, std::shared_ptr< parameters::Parameters > optionsIn={}, std::vector< std::string > tagsIn={})
Definition: fieldDescription.hpp:70
 
void DecompressComponents(PetscInt dim)
Definition: fieldDescription.cpp:98
 
virtual PetscObject CreatePetscField(DM dm) const
Definition: fieldDescription.cpp:21
 
std::vector< std::shared_ptr< FieldDescription > > GetFields() override
Definition: fieldDescription.cpp:113